Forum Moderators: phranque
My first post here, I have searched fairly extensive and couldnt find an example that works for my situation. I am using wordpress multi user with permalinks.
I have a permanent redirect as below and it works great
RewriteEngine on
RewriteCond %{HTTP_HOST} mydomain.myhost.com [NC]
RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301]
It redirects exactly as I want it to, however if I type in a url
mydomain.myhost.com/2009/mypost
it doesnt redirect the url to
mydomain.com/2009/mypost
basically I want to strip the myhost bit, to avoid any duplicate content on google. I have tested that both conditions work if I type below into a browser.
mydomain.myhost.com/2009/mypost
mydomain.com/2009/mypost
I hope there is a simple rewrite that I can add to my .htaccess given in the above working sample.
thanks in advance for any help..
[edited by: jdMorgan at 4:30 pm (utc) on Feb. 15, 2009]