Wildcard on sub-domain

MikeVrind

Verified User
Joined
Oct 12, 2008
Messages
52
Location
Netherlands
For the development for websites I make use of a subdomain names 'test.
So for each new website I developed I can use test.domain.nl/name-website/...

A big problem with this setup is that every website isn't running in the 'root' of a domain. Because of this I need to make to many adjustments to a website when the websites goes live. To avoid this problem I want to setup a wildcard on the subdomain named 'test' so I could use name-website.test.domain.nl.
My idea is that each name of the sub-subdomain is related to a folder in the 'test' subdomain. So when I create a new folder in test.website.nl it's available via folder-name.test.website.nl

But how can/must I do this? I have full acces to the server.
 
Last edited:
You will probably have to make a script that uses the directadmin api to add that subdomain to the serveralias of the virtualhost. You are better to use test.domain.com/foldername
 
I already have a sub.domain/folde construction, but I have to make to many adjustments to a website when it goes live.
 
You have several choices. One would be to point your site (use your local desktop system to a different IP#, and do your testing on it's own IP#. That way name-based hosting is immaterial; your site is found by the IP#. But you can't publish the IP# so you need to put it in your local hosts file.

Another would be to write code that works no matter the domain name. My understanding is that this is preferred by most webmasters, but since I'm not a webmaster I can't argue it's merits. I do know we create our sites to work no matter the domain name.

Jeff
 
Back
Top