Search code examples
magentourl-rewriting

Magento: how to remove all permanent redirects


We've encountered a problem where we have unwanted permanent redirects on a Magento store we're working on, and I'm looking to see how we can start with a blank slate in terms of these redirects. We do not need any since it's a developing site, and we wouldn't want anything redirected within this domain, either. The store is not live, and the following is what happened.

We didn't know about the URL Rewrite Management option under System -> Config -> Catalog -> SEO, so it was marked as "Yes" for "Create permanent redirects..." Some products were uploaded via a feed, but they were uploaded incorrectly. So, we re-uploaded them to over write. The result was that "White Shirt A" has its URL key as "white-shirt-a.html" in the admin or exported data feed, but the actual link that bring up the product is "white-shirt-a-1.html." If we go to "white-shirt-a.html," it gives us a 404 Not Found.

How do we clear all these permanent redirects? We've tried disabling or deleting these specific request path and target path entries under Catalog -> URL Rewrite Mangement, but they don't have any effect.


Solution

  • If your store is not live yet, follow this:

    1. Empty/Truncate core_url_rewrite table from Database.

    2. Disable Permanent Redirects from Magento Backend.

    3. Reindex Catalog URL Rewrites and all your URL's will be corrected.