I want all of my URLs to redirect the www version to the non "www" version and found this htaccess code to do it:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^mydomain.com$ [NC]
RewriteRule (.*) http://mydomain.com/$1 [R=301,L]
I have forums on a forums.mydomain.com subdomain though and it's removing the sub domain when I use this code.
Is there any way around this with mod_rewrite or will I have to content myself with using mydomain.com/forums instead of the sub domain?
Bookmarks