I am working on Magento 2 URL Rewrites. All working well expect one. In my old website have AccountSettings.asp?modwhat=change_b this URL and I am trying to rewrite this, but it doesn't working for me.

Any help on this?

1 Answer 1


This behavior is expected when reading Magento code. Magento rewrites are intended to be used to rewrite the request path and keep the query params (after the ? symbol) untouched.

You have two options :

  • Manage this by using the rewrite rules of the webserver

  • In the code by using a router

My favorite option would be to use rewrite rules. In the end, you should not not mix Magento and webserver rewrite rules.In your case I would advice to use only webserver rewrite rules.

  • any examples for above rules? how to rewrite the webserver rules?
    – Bojjaiah
    Commented Feb 28, 2017 at 10:12
  • Depends what webserver you are using. If using Apache, it should be something like : RewriteRule ^abc\/(.+)$ http://www.example.com/index.php#first [L,R=301, NE] Commented Feb 28, 2017 at 12:39

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.