1

This url

Redirect 301 /productdetail.php?pId=11390&base=1 http://domain.com/new-magento-url.html

This works

Redirect 301 /supertest http://domain.com/new-magento-url.html

I can see it is the .php but how do I except for that?

  • Looks like you need proper escaping for ? and . The regex actually means product.phppId or product.phId, not product.php?Id (the ? makes the last p optional). Try \? and \. instead of ? and . – thebod Feb 19 '16 at 13:36
1
RewriteCond %{QUERY_STRING} pId=11390&base=1
RewriteRule productdetail.php http://example.com/new-magento-url.html? [R=301,L]

That should match the query string you want and perform the redirect. Place it above the last Magento rewriterule for index.php

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.