This tutorial show how to resolve the Magento error: “Magento An error occurred while saving the URL rewrite”
First of all you need to re-index store data.
- Open Magento admin panel
- From the top menu select "System" > "Index Management"
- Check all Index Types, from the Actions box select "Reindex Data" and click "Submit".
- Change the permissions of your media folder to 777.
- Flush your cache, by deleting the /var/cache/ directory
- Delete your sessions, by removing your /var/sessions folder
- Try replacing your root .htaccess file with a default .htaccess file suitable for your Magento version