Magento – Removing Product URL Keys

indexingmagento-1.8product-urlsurl

We're currently using Magento CE v1.8 and are subject to the bug which causes product URL keys to be appended with an incremental number every time we run an index, which in turn is causing a large amount of URL rewrites to be generated each time as well. However, with the way our site operates we only use the category URL paths/keys i.e. the product URLs are not included in our sitemap and are not published for the public to use.

My question is; would there be a problem if we just removed all of the product URL keys?

Best Answer

from my point of view there are 2 alternative that you may follow to use only one url for one product. so it will be very good for SEO purpose.

1) Change "Use Categories Path for Product URLs" property in System -> Configuration -> Catalog to "No".

2) the method Mage_Catalog_Model_Product_Url::getUrl() checks this setting with $product->getDoNotUseCategoryId(). I called this method, and it returned NULL for all the products.

To solve this, I overloaded this method in my own product class:

public function getDoNotUseCategoryId(){
    return true;
}

This works.

i would suggest to use my first option.

hope this will sure help you.

Related Topic