0

I want to rewrite url like:

https://www.test.com/custom-parent-cat/sub-cat/10-12-14-17-19.html?cat=101

to

https://www.test.com/custom-parent-cat/sub-cat.html

Please help me to achieve this.

Thanks

2

1 Answer 1

0

Magento 2 reads parameters in the following format: somepage/param/param_value/

It ignores the question mark. In your situation you have 2 options to go:

  1. Manage this by using the rewrite rules of the webserver.

For more information on this, please check:

Nginx - https://www.nginx.com/blog/creating-nginx-rewrite-rules/

Apache - https://httpd.apache.org/docs/2.4/rewrite/remapping.html

  1. Write your custom router for processing URLs

Please see my example on how to do this there: Configure front name in admin panel

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.