Forum Moderators: phranque
I am seeing a lot of my pages in google looking like this:
mydomain.com/?limitstart=456
mydomain.com/?limitstart=345
etc.
I'd like to redirect these back to the index page-- but I'm not sure how to go about that, since it appears the ? is messing things up. Shouldn't a simple:
Redirect permanent /?limitstart http://example.com/
work? It doesn't. . .
Thanks for any tips.
[edited by: jdMorgan at 1:30 pm (utc) on June 17, 2009]
[edit reason] example.com [/edit]
You will need to use mod_rewrite to examine the query strings.
Assuming that you already have other working mod_rewrite rules, you could use:
RewriteCond %{QUERY_STRING} ^limitstart=
RewriteRule ^$ http://example.com/? [R=301,L]
However, you need to ask yourself, "How did these querystring URLs get into the search index in the first place?" Before implementing this redirect, be sure that there are no links on your site to those "bad" URLs. If there are, then you must correct them before implementing this redirect. Otherwise, you will see many errors in your Google Webmaster Tools report, and your 'quality score' may be negatively affected.
Jim