0

We have a new webshop that already has some good indexed links in Google. But the links (from an old Magento) contain a .html extension.

So I wanted to redirect them all to the non .html URL (using htaccess) but Magento 2 is loading some scripts in the shopping cart from files that contain .html, like carttotals.html, so it's also removing that .html and that crashes the whole shop.

Is there a way to only remove the .html from links that are coming from an external site like Google so it will not remove the .html from internal links and files?

Regards,

1 Answer 1

0

Apache has .htaccess files and mod_rewrite, In your .htaccess file, set: DirectoryIndex index.html You can also set this up in the Apache site config files too

You can specify a list of filenames, so if it doesn't find the first it moves to the next.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.