View Single Post
  #7  
Old 15th August 2006, 18:53
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,146
Thanks: 4
Thanked 55 Times in 51 Posts
Default

You can create a wildcard entry for the subs and point it to the domain or your IP in the dns...
Code:
*.domain.com.      IN  A    1.2.3.4
Then in the apache config create something like this:
Code:
    DocumentRoot /www/domain/html
    ServerName www.domain.com
    ServerAlias *.domain.com
And then you only need a .htaccess with rewriting... something like this should work
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
RewriteCond %{HTTP_HOST} ^a(.*)-01\.domain\.com [NC]
RewriteRule ^(.*) /A%1/$1 [L]

Last edited by sjau; 15th August 2006 at 18:56.
Reply With Quote