News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

htaccess 301 .html suffix

Started by fabioweb, September 10, 2016, 09:36:45 AM

Previous topic - Next topic

fabioweb

Hello!
in a virtuemart3 website i get url like these:

1) www.website.it/product1
2) www.website.it/product2
3) www.website.it/product3

the problem is that i get indexed also these urls visible only for google

1) www.website.it/product1.html
2) www.website.it/product2.html
3) www.website.it/product3.html

How can i redirect with a generical code .html to relative non .html url?

Thank you!

jjk

#1
I suppose the *.html pages were indexed by Google some time ago. They will disappear after a while if those .html pages are not available anymore. If you use an xml sitemap which is not updated automatically, check the sitemap for (outdated) .html entries.

Perhaps this would work if added to your .htaccess file (I didn't test it)
RewriteEngine On
RewriteRule ^(.*)\.html$ $1 [R=301,L]


But if there are only a few .html urls, I would use the Joomla redirect manager for that.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations