I've built a new PHP site for a customer and want to redirect the top ranking Google results from the old site structure to the new one.
I've put several dozen Redirect 301's in a .htaccess in the documentroot, and while some work fine I'm having issues with a bunch of others.
This works fine:
Redirect 301 /nl/flash/banner_new.swf http://www.example.com/actueel/nieuws.html?action=show&f_id=152
This doesn't work! (leading to a 404 since the redirect is simply skipped):
Redirect 301 /nl/index.php?mID=24511&subID=0 http://www.example.com/solutions/printsolutions.html
Redirect 301 /nl/index.php?mID=24512&subID=0 http://www.example.com/support/koppeling-met-omgeving.html
The redirects are mixed in the .htaccess file, and only the redirects with GET parameters appear to fail.
Is there a workaround? Ignoring the failing redirects is not an option to the customer. Thanks for your thoughts.
While Gumbo's answer's reasoning was correct, I could not get his RewriteRule to work.
Adding another RewriteCond did it. The following was tested and works fine.
RewriteCond %{REQUEST_URI} /nl/index.php$
RewriteCond %{QUERY_STRING} ^mID=24511&subID=0$
RewriteRule ^.*$ http://www.example.com/solutions/printsolutions.html [L,R=301]