0

I have a requirement wherein I need to redirect multiple categories to external site's respective category pages. For the same I have created categories in magento. Whenever we create a category in magento it creates a url rewrite so that you can access category via url_key.

Example:

Category name: Events

Category url_key: events

category url: events.html

category url rewrite target path: catalog/category/view/id/175

Now if I try to create url rewrite for events.html, it gives me error "Request Path for Specified Store already exists."

I know I can delete the existing url rewrite and create new where request path is "catalog/category/view/id/175" and target path is external site url. (in this case request path can not be events.html as magento will never find events.html as we have deleted the url rewrite)

However, I do not wish to go with category ids as category ids will be different on different environments like dev, stage and production. Plus I do not want to manually delete all those url rewrites that magento has created.

5
  • On which url events.html of catalog/category/view/id/175 user hit external page? – Amit Bera Aug 27 '20 at 12:39
  • If you are considering an opportunity to using an paid solution - MageWorx SEO Suite extension has the own redirects from category/product/customURLs to any category/product/custom URL. This solution based on own database table for redirects and allow to avoid "Request Path for Specified Store already exists" issue. – sergei.sss Aug 27 '20 at 12:48
  • @AmitBera on hit of events.html i wish to redirect to external url – Sejal Shah Aug 27 '20 at 13:32
  • @sergei.sss I wish to redirect urls based on their url keys not on the id basis – Sejal Shah Aug 27 '20 at 13:35
  • @SejalShah For this case you can use category path (which based on categories URL Keys) as custom URL – sergei.sss Aug 28 '20 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.