Forum Moderators: phranque
http:httpd.apache.org/docs/vhosts/index.html
---
The following "code snippet" may work, but you will have to edit based on your site (chaning domain, tld, etc.). Any edits by other users would be appreciated (or comments):
RewriteEngineon
RewriteMap lc int:tolower
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.+) - [L]
RewriteCond %{HTTP_HOST} !\.domain\.com$ [NC]
RewriteRule ^(.+) - [L]
RewriteCond %{HTTP_HOST} ^[^.]+\.domain\.com$ [NC]
RewriteRule ^/icons/(.+) - [PT,L]
RewriteRule ^(.+) %{HTTP_HOST}=$1 [C]
RewriteRule ^(.*)=(.*) ${lc:$1}$2 [C]
RewriteRule ^([^.]+)\.domain\.com(.*) /server/path/to/htdocs/$1$2