2

I am trying to remove ".html" from the URL. Attached are my catalog SEO setting in the Magento 2. As you can see I have remove the ".html" from both Category URL Suffix and Product URL Suffix. enter image description here I'm stumped as to why it still shows the .html at the end. I have cleared all caches and reindexed all indexes.

asked Sep 27, 2016 at 17:17
3
  • Delete var folder from root and check it after browser cache. Commented Sep 28, 2016 at 7:33
  • I deleted everything in the root var folder, cleared all caches and it still shows .html at the end of product URL's even though it's removed from the product suffix. Commented Sep 29, 2016 at 2:45
  • We could not even remove the .html suffix as it presented some duplicate entry error. Commented Nov 8, 2016 at 20:27

3 Answers 3

1

This worked for me:

UPDATE `url_rewrite` SET `request_path` = REPLACE(`request_path`, ".html", "")

It simply removes the .html suffix from the URL rewrites table. You then need to reindex after.

answered Apr 3, 2019 at 16:47
0

I had the same issue,

for me, all pages are working except the home page.

I did all the all settings and reindexed, cache cleared etc, but the error remained. so finally found the solution for this issue

remove "noroute" from "Default No-route URL" field under Default Page in Stores -> Configuration -> web.

Finally, filed value ll be "cms/index".

this may help one day for someone.

answered Dec 12, 2018 at 12:14
0

Here are the steps to solve the issue:

  • Backup your current Magento2 database
  • Delete all records from table url_rewrite. You can run the following SQL command:

    DELETE FROM url_rewrite WHERE entity_type = 'product';
    
  • Login to your Magento 2 backend

  • Re-save all your Categories
  • Clean the Magento2 cache
  • Now, you should be able to save/update the Product URL Suffix in the Configuration Settings.
answered Jan 17, 2019 at 7:37

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.