Do spammers really leave referrers?<br><br><div><span class="gmail_quote">2006/9/18, Gabor Hojtsy <<a href="mailto:gabor@hojtsy.hu">gabor@hojtsy.hu</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
We have some .htaccess directives at <a href="http://weblabor.hu">weblabor.hu</a> to cut down on pointless<br>CPU usage. One is denying requests based on referers (which is trackback<br>related too).<br><br>SetEnvIfNoCase Referer ".*(casino).*" BadReferrer
<br>SetEnvIfNoCase Referer ".*(pharmacy).*" BadReferrer<br>SetEnvIfNoCase Referer ".*(gambling).*" BadReferrer<br>SetEnvIfNoCase Referer ".*(poker).*" BadReferrer<br>SetEnvIfNoCase Referer ".*(pills).*" BadReferrer
<br>deny from env=BadReferrer<br><br>Also if you would like to send a proper(!) "Gone" HTTP code to user agents<br>who try to request your previously available trackback URLs, you can do:<br><br>RewriteCond %{REQUEST_FILENAME} !-f
<br>RewriteRule ^trackback - [G]<br><br>This sends a "Gone" HTTP status to the requester. This is better then an<br>"Access denied" status, since you explictly state that the resource does<br>not exist anymore, and any reference to it should be removed. The actual
<br>difference in meaning is only relevant for well-behaving bots, not the<br>spammers, but it is nice to accurately inform well-behaving bots about the<br>situation.<br><br></blockquote></div>