Fixing Broken Magento URL Rewrites

I came across an odd issue whereby some catalog URLs where being rewritten to include extra characters that shouldn’t be there. After much hair-pulling I discovered a fix. Rather than writing custom URLs try the following.

Log in to your database server. Here I am using phpMyAdmin. Navigate to the correct database, then the core_url_rewrite table.

Create a backup of the table on the Export tab

Screen Shot 2015-08-03 at 15.19.05 (2)

Navigate to the Browse tab. At the bottom Check All then Delete. Check you have the correct data/table select and accept the Are You Sure? Prompt.

Screen Shot 2015-08-03 at 15.22.41 (2)

Close phpMyAdmin, log in to the Magento admin panel, then, navigate to System > Index Management. Check Catalog URL Rewrites select Reindex data and press Submit.

Screen Shot 2015-08-03 at 15.26.47 (2)

This will force repopulation of the core_url_rewrite table. If it hasn’t, you can reimport data through the backup created earlier.

Hopefully this sorts your Magento URL rewrite issues!

Leave a Reply

Your email address will not be published. Required fields are marked *