I have the following code in my .htacess file for my website to remove '.html' from my urls and to redirect any .html to the same page without it (http://ift.tt/1mN11dx to example.com/home)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.html$ /$1 [L,R=301]
#301 from http://ift.tt/1bR7cVG to example.com/page
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.html\ HTTP/
RewriteRule ^(.*)\.html$ /$1 [R=301,L]
However, when I try to click on links that are pointed to other pages on my website, I get a 404 error. I've tried setting the href to http://ift.tt/TfmP3j, /page2 and more but I still get the same error. Any help?
Aucun commentaire:
Enregistrer un commentaire