Forum Moderators: phranque

Message Too Old, No Replies

referral spam and .htaccess

Casino guys have been shutting down my site

         

creepychris

5:23 am on Oct 1, 2005 (gmt 0)

10+ Year Member



Referral spam is annoying to say the least. But this time, they have actually shut down sections of my site by massive queries to MySQL databases through PHP url requests. Why they do it I don't know as I don't make my referral logs public so there is no link pop to be gained. My guess is they scraped my urls along with a gazillion others somewhere and just don't care as long as SOME of the spamming they do ends up in Googlebot spiderable links.

Anyways, they have shut my databases down for two days and it took me the better part of four hours to track it down so I'm irate. Things are working again and here is how I did it. I added some simple line to .htaccess.

RewriteCond %{HTTP_REFERER} (casino) [OR]
RewriteCond %{HTTP_REFERER} (gambling) [OR]
RewriteCond %{HTTP_REFERER} (poker) [OR]

This is the first time I've used to .htacess to block referrers (as I usually block by user agent). How does it look? I've tested it and it seems to be blocking what I want blocked.

Normally, I don't care about referrer spam as I don't make my logs public but this time they had a very serious detrimental effect on my site. The 'attack' came as thousands of keyword-combination urls centered on gambling, poker, and casino that redirected to other casino sites. Each keyword-stuffed url reuqested thousands of php based urls. This massive traffic caused a system overload.

andrea99

7:14 am on Oct 1, 2005 (gmt 0)



Thanks, these referrers have been ruining my stats for weeks, I'll let you know how it works.

don't forget:

RewriteEngine on