Referrer Spam

   15 December 2004, late at night

In an attempt to clean up my referrer logs which have become inundated with spam, I have blocked requests to this page from referrers with at least 2 dashes in their name that are .info domains. If you notice any problems please let me know. Of course, the problem here is that if you do have any problems, you probably won’t see this post.

I am blocking the spam using the following commands in my .htaccess file:

  1. RewriteEngine on
  2. RewriteBase /
  3.  
  4. RewriteCond %{HTTP_REFERER} ^.*(-).*(-).*(-).*$
  5.  
  6.  
  7. Download this code: /static/code/5.txt

This will turn on mod_rewrite, check if the referrer URL has 2 dashes and ends in .info, and if it does send back a forbidden error.

 

Comments

  1. Great idea! I’ve been battling poker sites for the past couple days also… Nice blog by the way!

Don't be shy, you can comment too!

 
Some things to keep in mind: You can style comments using Textile. In particular, *text* will get turned into text and _text_ will get turned into text. You can post a link using the command "linktext":link, so something like "google":http://www.google.com will get turned in to google. I may erase off-topic comments, or edit poorly formatted comments; I do this very rarely.