Remove Parent Category Path From Sub Category Url In Magento

I have a website which has the 4 levels of the category and each and every category is coming in the url hence the url looks like as a very long string as http://www.abcxyz.com/test-category/test-category-level-1/test-category-level-1-1/test-category-level-1-2/test-category-level-1-3.html For this reason client wants to show only the current category name not the parent

Redirect to old url after clear the cache in Magento

Today, I have moved one website from our testing server to the client server and every thing was working fine. But the problem arises when I have cleared the cache from the Magento admin. After clearing the Cache it is redirected to the old url (testing server). After doing