Need help to finish off this solution: I'm running a domain with serveral subdomains. Each subdomain already has a proper DNS entry. I have this partially working with: ServerAlias *.domain.com RewriteEngine on RewriteCond %{HTTP_HOST} !^www.* [NC] RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com RewriteCond /var/www/vhosts/domain.com/httpdocs/%1 -d RewriteRule ^(.*) /%1/$1 [L] example.domain.com will correctly point to the dir /var/www/vhosts/domain.com/httpdocs/example I also need www.example.domain.com to point there AND for webmail.domain.com to NOT point to /var/www/vhosts/domain.com/httpdocs/webmail Please help!
- Ignores: www.domain.com and webmail.domain.com - foo.domain.com will point to /var/www/vhosts/domain.com/httpdocs/foo - www.foo.domain.com will point to /var/www/vhosts/domain.com/httpdocs/foo I have not tested this so tell me if you are having any problems or comments