I basically know how to import and redirect urls with the Magento URL Rewrite Tool.

Now I have the case that I need to redirect

shop/shop.php?blbla=238746t2345 to the product.

I prepared and imported everything but as the string contains .php it seems to be ignored by the rewrite tool.

Is there any workaround for this?

Could I rewrite maybe shop.php to shop-php by htaccess before and the rewrite it again with the rewrite tool?

What would be the htaccess directive for that?

1 Answer 1


You have to use RedirectMatch in order to redirect URLs with parameters. For Example:

RedirectMatch 301 /shop.php?id=17299 /target-url.html

Put them after RewriteEngine on, but before the first RewriteRule.

  • Hi Andreas and thanks for the answer. This is how didi it finally. I first though I could use magentos rewrite management better for it, but doing it with a server rewrite was much easier. Jan 19, 2016 at 7:50

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.