Forum Moderators: phranque
thanx!
ohad
--------
RewriteEngine on
RewriteCond %{HTTP_HOST}!^(www\\.)?example\\.com [NC]
RewriteCond %{HTTP_HOST} ^(.*)\\.example\\.com [NC]
RewriteRule .* [example.com...] [R=301,L]
invalid subdomains lead to user-created subdirectories that are created by my site
for example:
user1.example.com leads to www.example.com/blog/user1
user2.example.com leads to www.example.com/blog/user2
the code above is correctly directing the user-created subdomains to their appropriate subdirectories, but now its also redirecting my valid subdomains like mail and forum to:
www.example.com/blog/mail
and
www.example.com/blog/forum
argh! i think i have to separately specify all my valid subdomains...