Page is a not externally linkable
- Google
-- Google SEO News and Discussion
---- Spam words in a query string - do these backlinks hurt rankings?


jdMorgan - 2:56 pm on May 12, 2010 (gmt 0)


You are apparently rewriting to your 404 page, which will return the proper "content" but with a 200-OK response. That is likely NOT what you want.

Also, because the syntax may differ between ISAPI Rewrite and Apache mod_rewrite I cannot be sure, but in mod_rewrite the %{QUERY_STRING} variable does not include the "?" character -- It is a delimiter between the URL-path and the query string, and is not a part of either.

This is the reason that TheMadScientist referred to the THE_REQUEST variable above, because it *does* include the question mark, even if the following query string is blank.

The 200-OK response problem can probably be fixed in one of two ways, depending on which version of Apache mod_rewrite ISAPI Rewrite is compatible with. I'd suggest trying the following:

Apache 2.x compatible:

RewriteBase /
RewriteCond %{QUERY_STRING} ^([^&]*&)*searchterm=[^&]* [NC]
RewriteRule .* - [R=404,L]

-or-
Apache 1.3.x compatible:

RewriteBase /
RewriteCond %{QUERY_STRING} ^([^&]*&)*searchterm=[^&]* [NC]
RewriteRule .* /some-path-that-you-know-will-never-exist.html? [L]

Jim


Thread source:: http://www.webmasterworld.com/google/4129314.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com