Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Set up new virtual hosts by creating new folders' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set up new virtual hosts by creating new folders
Authored by: krang on Dec 16, '08 08:19:59AM

There is another alternative, by using Apache rewrite rules:

The main part of the linked document is:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^[a-z0-9]+(.[a-z0-9]+)*.[a-z]$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^([a-z0-9]+(.[a-z0-9]+)*).[a-z]*) /Library/WebServer/Projects/$1$3

Where the "" bit should be changed (or removed).

This system is setup to use URLs like:

And with a locally running DNS server, you can wildcard the sub-domain "" to point to the localhost (or its IP, if you want multiple hosts to connect).

Details for the DNS setup can be found:

[ Reply to This | # ]