I have a weird problem with Magento. I have created catalogs and rewrite it to display custom page and product. The rewrites are successful however after re-indexing the default system URL were shown.
These are my steps in URL re-writing:
Delete old system URL.
Create new URL re-write by selecting custom in the drop-down box.
Fill out necessary fields and save.
Flush Magento cache.
The problem is that when I try to re-index, the system URL reverts back.
QUESTION:
Why is it that the old system URL reverts back?
What are the necessary procedures to prevent this to happen?
Do I have to stop re-indexing for the entire life of the system?
This is a sample screen shot of my URL rewrite after re-indexing.
Thanks!
This is how I solved my problem
Based on this question Magento 1.7.0.2 Index Management overwriting URL Rewrites I discover a good solution.
I back up my database. I delete all my custom url rewrite that are not deleted after reindexing. I locate the default system catalog URL rewrite and update Redirect drop down from No to Permanent (301) and save it. I create new custom URL rewrite. I create a unique ID Path (catalog/153) From the default system catalog URL rewrite I copied the Target Path and paste it on Request Path of my custom URL rewrite. On the Target Path, I pasted the desired Page URL. Change the Redirect drop-down from No to Permanent (301) and save it. Finally, I clear my cache and re-index again. Problem solved!
Every time I re-index, all URL rewrite were not deleted and works perfectly fine.
To resolve above issue, follow the below-mentioned steps:
Step 1- Goto Catalog-> URL Rewrite Management and search for id in the ID path column.
Step 2- Open it and change the redirect option from No to Permanent(301). Also, copy the text inside Target Path non-editable field. It may look like this catalog/category/view/id/55.
Then click on Save.
Step 3- Then for redirecting this category page to Custom or CMS page, we've to add new URL rewrite.
To do so, Click Add URL rewrite button in Catalog->URL rewrite Management. It'll take you to Add New URL rewrite screen, where you've to choose Custom from Create URL Rewrite drop-down list.
It will then take you to another new page where you've to enter ID path, Request Path, and Target Path.
ID path — It must be any unique identifier. It can anything like "test123" or whatever as you wish.
Request Path — It must be the Target path which we've copied before catalog/category/view/id/55 in step1.
Target Path — It should be the Custom or CMS page URL Key which you want to redirect. For example Gift.
Then select Redirection to Permanent(301) from the drop-down and click on Save.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.