[wp-hackers] ref parameters and fake url

Otto otto at ottodestruct.com
Thu Mar 27 16:44:44 GMT 2008

I'm still not sure why sites add that ref parameter, but if you know
you don't have any plugins using it, then this will eliminate it from
your site and, eventually, from Google:

RewriteCond %{THE_REQUEST} \?(ref=.*)?\ HTTP [NC]
RewriteRule .? http://example.com%{REQUEST_URI}? [R=301,L]

The idea is that when somebody makes a link to your site with the
ref=whatever parameter, you perm redirect them to the real URL. Google
will then follow these links, see the perm redirect, and change its
own indexes accordingly. No more ref=spammer sites listed for you in


More information about the wp-hackers mailing list