I have several 404 links that need to be redirected. They are from an external source so I don't have the control to change the links. So I am wanting a rewrite rule for htaccess I can use.
Here is a sample of the original link: http://www.abc.com/index.php?controller=product?pageid=444
Here is what it should look like: http://www.abc.com/index.php?controller=product&id_product=444
This is the rewrite I am trying but it doesn't match. Neither does the other option which escapes the ? in the rewrite rule.
RewriteCond %{QUERY_STRING} ^controller=product?pageid=444$ [NC]
RewriteRule ^/index\.php$ /index.php?controller=product&id_product=444? [R=301,L]
RewriteCond %{QUERY_STRING} ^controller=product?pageid=444$ [NC]
RewriteRule ^/index\.php$ /index.php\?controller=product&id_product=444? [R=301,L]
Please tell me what I am doing wrong in the regexes I have.
Thanks,