Fix duplicated and trash rewrites in default Magento CE URL rewrite system (core_url_rewrite table)
Fix duplicated and trash rewrites in default Magento URL rewrite system (core_url_rewrite table)
This is just local rewrite of app/code/local/Mage/Catalog/Model/Url.php - copy to your Magento root folder, clean cache and run catalog url reindex.
More details about Magento URL rewrite duplicates