I've set the wildcard entry in the domain's DNS, but the mod_rewrite part is kicking the crap out of me.
Basically, * must redirect, with the exception of webmail, chat, and www.
Here's what I have in the domains root vhost.conf so far (found it on the sw-soft forum), but it seems to create a loop that causes the browser to return an error about too many redirects.
Code: Select all
ServerAlias *.domain.com
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain.com$
RewriteCond %{HTTP_HOST} !^chat\.domain.com$
RewriteCond %{HTTP_HOST} !^webmail\.domain.com$
RewriteCond %{HTTP_HOST} ^[^.]+\.domain.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^([^.]+)\.domain.com(.*) /home/httpd/vhosts/domain.com/httpdocs/$1$2