how to redirect target path url?

target path = http://www.test.com/catalog/product/view/id/1016/category/729

redirect to

orignal path = http://www.test.com/product-url.html

i need to fix for all products.

Is there any solution to fix this problem with code.


2 Answers 2


Regenerate Url rewrites

  1. https://github.com/olegkoval/magento2-regenerate_url_rewrites
  2. https://github.com/elgentos/regenerate-catalog-urls
  3. https://shreejiinfosys.co.in/url-rewrite-generator-magento-2.html

Create URL Rewrites in Magento 2

  1. https://amasty.com/knowledge-base/magento-2-url-rewrite.html
  2. https://www.mageplaza.com/kb/how-to-create-url-rewrites-magento-2.html
  • i am looking something redirect target path to original path like above example i have given Commented Feb 3, 2021 at 12:36

I have the same problem in Magento 2.4.3

How to reproduce:

  1. Calling domain.tld/catalog/category/view/id/3
  2. Calling domain.tld/some-friendly-url.html

Expected result: /catalog/category/view/id/3 should redirect to /some-friendly-url.html

Actual result: Both URLs are accessible and there is no redirection to friendly URL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.