This is probably an easy question, but we can not find why the 301 is not working. When we have a url with a question mark the 301 redirect in our .htacces
is not working. For example:
/order/order.html?AddID=1078&Rand=666171759380936096
so:
Redirect 301 /order/order.html?AddID=1078&Rand=666171759380936096
http://www.domain.nl
In our webmaster tools we have 8000 url's with the same structure /order/order.html?AddID=....
that say 404 not found. We want to 301 redirect them to the homepage, but we get a 404 not found page instead. when we use the same redirect with only /order/order.html
he is redirected correct.
You can't match against the query string in a
Redirect
statement, use mod_rewrite and match against the%{QUERY_STRING}
var:But since you have like 8000 URLs that start with the query string
?AddID=
, then you can just match against that: