what do i need to put in my htaccess file to make any of the .htm pages direct to and .html page, might not make sense but it has to do with a shitload of .htm pages being indexed that dont exist anymore.
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.htm $1.html [nc]
But if you want the search engines to reflect new pages as being indexed as .html files, then you will need to do something different. You will have to actually Perm. redirect them. Try this code below:
Code:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.+)\.htm http://YOURDOMAIN.COM/$1.html [r=301,nc]
Replace YOURDOMAIN.COM with your domain name.
NOTE: If you get a 500 internal error or something after putting in the code, try taking out Options +FollowSymlinks and see if it works. It may already be enabled on your server but disallowed in .htaccess.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.