Fixing the .html.html url problem in Magento

1 · bitExpert AG · March 16, 2022, midnight
A while ago we took over a Magento 1 shop that was migrated over to Magento 2. Some products and categories has a “.html.html” url postfix and the merchant wanted to have this fixed. When data was migrated from Magento 1 shop, the url keys came with ".html" suffix. On Magento 2, you have url\_key and url\_path attributes that help creating the urls for products and categories. Since the url\_key attribute contained the “.html” postfix and url\_path appended an additional “.html” postfix, the sou...