samedi 28 février 2015

.htaccess non-www to www causing 404 link error

I changed my website from example.com to www.example.com in the .htaccess using this 301 redirect code below.



RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]


The homepage works fine now and redirects properly to the www version instead of the non www version of my site which is what I wanted. But now the links on my site do not work at all and I'm getting a 404 doesn't exist page. I'm using Wordpress. How can I fix this?


Aucun commentaire:

Enregistrer un commentaire