Url rewrite problem - Magento

3 replies
  • WEB DESIGN
  • |
Hello,

I'm currently experiencing a problem with my website which has been created with Magento & I need to know if anyone else has experience the same issue and hopefully resolved the fault.

Within url rewrite management in the admin section we noticed there were a alarming number of url rewrites, over 150,000. Our website holds around 7000 products and we have definitely not changed that many urls!

What appeared to be occurring was odd, if a product had a identical url as another, Mangento would add a number to the url. This is obviously to give the products with duplicate urls a unique url. The problem was that this number used to separate the urls kept going up and up. This increment occurred when the website reindexed.

Now, my question is this, if I have two duplicate urls, for example pen.html, Magento can create a unique url by adding a number e.g (1) - pen.html (2) - pen-1.html. These urls are now unique to the system and do not need to be altered. Why is Magento continuing to create new urls by increasing this number during a reindex when the products now both have a unique url?

I have tried this on a fresh install on Magento with on two products on the site using identical urls. Magento did exactly the same thing and continued to add additional numbers to the urls. I have search online and it seems to be a major bug in the software.

Has anyone had the same problem and do you know of a fix for this?


Thanks for your help.
#magento #problem #reindex #rewrite #url
  • Profile picture of the author getbestdesign
    i think this is not the right place for you, go to programming area you may find the solution to your problem there...
    Signature
    GetBestDesigns.com
    Only the best for the best from the best.....
    {{ DiscussionBoard.errors[9294977].message }}
  • Profile picture of the author Ben Holmes
    Found on the web: Fixing weird URL Rewrites

    Sometimes when you make changes to your products, or enable a certain extension, Magento might start to rewrite all your URLs to include a suffix "-1" or some other number. Within the URL Rewrites, Magento differentiates between System URLs and Custom URLs. If the System URLs are broken like this, you should not fix this by adding new Custom URLs.

    Instead, open up phpMyAdmin, create a backup of your Magento database, and flush the Magento table core_url_rewrite (so that it becomes totally empty). Immediately afterwards, refresh the Catalog Url Rewrites under Index Management. This will regenerate all System URLs.

    Does that help? If not, previous poster has the answer, go to where the programmers are...
    {{ DiscussionBoard.errors[9295818].message }}
  • Profile picture of the author kpmedia
    ^ I'd start with that advice right there. Flush it.

    Magento can be a real PITA. I've used it for 5 years now. It's still the best ecommerce app out there, however. Learn to live with its quirks.
    {{ DiscussionBoard.errors[9296405].message }}

Trending Topics