I hope someone could help me. How will I redirect http://www.example.com to http://forums.example.com and http://example.com to http://forums.example.com
with something like this: Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule .* http://www.example.com%{REQUEST_URI} [R=301,L] RewriteCond %{HTTP_HOST} !^(www\.)?example\.com$ [NC] RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.example\.com$ [NC] RewriteCond %{ENV:REDIRECT_STATUS} ^$ RewriteRule ^(.*)$ /%2/$1 [QSA,L] Code (markup): it will redirect www.example.com/test/ and example.com/test/ to test.example.com Not tested