1

I am migrating a store from an old custom commerce system to Magento 2. I am trying to add URL rewrites into Magento 2 using the Marketing -> Url Rewrite tool.

The old URLs for the store look like this:

store/detail/x.php?id=123

I can enter that into the Request Path just fine, but anything with a ? in it never actually forwards to the Target Path. If I remove the ?, it redirects fine.. but obviously that is not a valid URL.

Any ideas or suggestions?

2

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:

2) Write your custom router for processing URLs

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

  • I was trying to avoid this route, but it looks easier to put them in nginx than it does to create a new url processor. – Adam R. Oct 16 '18 at 16:48

Your Answer

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

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