Forum Moderators: phranque
AS I mentioned in the email, the site in question is Wordpress 2.0.9. Below is the .htaccess file contents:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/(stats¦failed_auth\.html)/?(.*)$ [NC]
RewriteRule ^.*$ - [L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{HTTP_REFERER} bogus-query-domain.com\.com
order allow,deny
deny from (server 1 IP address of bogus query domain)
deny from (server 2 IP address of bogus query domain)
allow from all
Also, since I don't use WP myself, and don't read many blogs, I have no idea yet if your site is all-static (except for /admin) or if it's a full-blown dynamic site. The problem can be solved either way, but knowing exactly what the problem is will reduce the time required to days instead of months... :)
The basic idea is to exclude folders and files on your site that *do* require query strings, and redirect the rest, like this:
# If the query-string is non-blank
RewriteCond %{QUERY_STRING} .
# and if not an admin folder request
RewriteCond %{REQUEST_URI} !/admin/
# and if not a "birdpressed" script request
RewriteCond %{REQUEST_URI} !/birdpressed/
# and if not a widgetizer.php script request
RewriteCond %{REQUEST_URI} !/scripts/widgetizer.php
# then externally redirect to the requested URL, but with the query string cleared.
RewriteRule (.*) http://www.example.com/$1? [R=301,L]
Jim