My workplace is setting up a dev box that will only be accessible from the local network, and we'd like to do different clients' sites on different subdomains. I swiped some rewrite conditions off the internet that I believe will get modrewrite all setup to forward subdomains to directories, and I believe it's working, but putting subdomains before the ipaddress doesn't work.
I think it's because it wants some sort of actual name for the box, but I'm not sure how to give it that. Obviously I'm not about to buy a TLD for it, putting the name of the box in the browser fails. I tried making up a domain name for it and putting that in my hosts file to resolve to the correct IP address, but that didn't work either. I suppose I could go into the DNS server and route traffic that way, but it seems like there's a more elegant solution.
I'm looking for any ideas you may have. Thanks.
PS - The swiped rewrite conditions:
ServerName big-ugly-box
RewriteEngine on
RewriteCond %{HTTP_HOST} !^
www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com
RewriteCond /var/www/%1 -d
RewriteRule ^(.*) /%1/$1 [L]