How to remove .html suffix?
-
16-03-2021 - |
Question
I have a running store with around 600 products and wanted to remove the HTML suffix from my URLs.
I removed the HTML in the config and reindexed. All HTML pages are being redirected to the non-HTML variants.
I have read online people are putting the 301 redirects manually in their .htaccess
e.g.
RewriteRule ^index.php/?(.*).html$ /$1 [R=301,L]
But is this really necessary when I don't get 404s?
Is manual .htaccess 301 redirect necessary?
Any insight appreciated
Thanks
No correct solution
OTHER TIPS
In theory when you updated the config magento should have created the redirects in the url rewrite db table. Therefore updating htacess is unnecessary.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange