cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 Category url rewrite is not working

Re: Magento 2 Category url rewrite is not working

I migrated Magento 1.x to Magento 2.x, after migration of catalog data, categories are visible successfully in the admin side. When I am using Magento frontend to access categories, then it redirects page where it is showing 404 error page not found.

Re: Magento 2 Category url rewrite is not working

The double suffix issue is because you have probably migrated from M1 to M2.

You can solve it in .htaccess like this:

RewriteEngine On
RewriteBase /
# START exact file names to exclude
RewriteRule ^(a.html) - [L] 
# END exact file names to exclude
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*?)/?$ $1.html [NC,L]