How to disable the categories path in URL in Magento 1?
Magento has a functionality that allows you to layered category names in the product URL. You can enable/disable this feature from Magento admin panel. Why some of you want to disable this because this is causing some serious SEO problems as it creates duplicate URLs.
System => Configuration => Catalog => Catalog => Search Engine Optimization and set “Use categories path for product URL’s” to “no”.