Hi all
I am implementing a canoconical redirect into my site for permanent 301's and I am coming across a strange thing.
My homepage is as follows:
www.mysite.com/home
If I remove the www. the page redirects to
www.mysite.com/index.php
Here is the code i use in my htaccess:
RewriteCond %{HTTP_HOST} !^www\.mysite\.com$
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
Why won't it redirect to /home ?
Also, this goes for some deeper links. e.g:
www.mysite.com/category/subcategory/product-detail
When i remove the www. the redirect goes to:
www.mysite.com/category.php/subcategory/product-detail
Any thoughts?
kbc