I don't know why, but google has over 6,000 indexed pages of domain.com and only 50 for www.domain.com So, I want to do a redirect from www.domain to just domain. How do I do it? The normal redirect for www.domain to domain would be RewriteEngine on RewriteCond %{HTTP_HOST} ^domain\.com RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L] What do I need to change to make it go the other way round?
RewriteCond %{HTTP_HOST} ^www\.domain\.com RewriteRule ^(.*)$ http://domain.com/$1 [R=permanent,L] I think, but I could be wrong. Only take a second to try it though.