How to remove magento parent category path from sub category url

How to remove parent category path from sub category url?
Instance: http://www.eye4eyeglasses.com/eyeglasses/cheap-eyeglasses
I just want the category c url is http://www.eye4eyeglasses.com/cheap-eyeglasses

Edit /app/code/core/Mage/Catalog/Model/Url.php
Find around line 632 and change:

//if (null === $parentPath) {
//$parentPath = $this->getResource()->getCategoryParentPath($category);
//}
//elseif ($parentPath == '/') {
$parentPath = '';
//}

Now save and upload it.
Do not forget to re-index Catalog URL Rewrites in Index Management.
Now login to admin panel of your site then go to System->Config->Index Management and click on select all then select Reindex Data from the Action Dropdown then click on submit.