Guys need a little assistance if you please:
I would like to redirect subdirectories on my site to make sure I don't have canonical url problems with them, but am having difficulty. Works fine on root but not on the directories. I am using:
Code:
# IF there's a host field at all
RewriteCond %{HTTP_HOST} .
# IF domain does not start with www
RewriteCond %{HTTP_HOST} !^www\.domainname
# THEN redirect everything to an appropriate location
RewriteRule (.*) http://www.domainname.co.uk/$1 [R=301,L]
I assumed that it would work, but now I have checked and it doesn't.
Bookmarks