I need to remove .html from category Url.
e.g
https://mysite/categoryname.html
Required url:
https://mysite/categoryname
I am removing from admin. But it's not working.
Does anyone have a solution for this?
Thanks
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI need to remove .html from category Url.
e.g
https://mysite/categoryname.html
Required url:
https://mysite/categoryname
I am removing from admin. But it's not working.
Does anyone have a solution for this?
Thanks
Open admin panel and go to :-
Stores >> Configuration >> Catalog >> Search Engine Optimization
Here Two option
Product URL Suffix = .html
Category URL Suffix= .html
Please leave as Blank
Please see screenshots :- https://prnt.sc/nd2owm
If you get this type of error :-
Unique constraint violation found
Please Follow this steps one by one.
1). Backup your current Magento2 database
2). Delete all records from table url_rewrite. You can run the following SQL command: DELETE FROM url_rewrite WHERE entity_type = 'product';
3).Login to your Magento 2 backend >> Re-save all your Categories
and then run this command :- php bin/magento cache:flush
4).Then you will be able to save the Product URL Suffix in the Configuration Settings.