Forum Moderators: phranque

Message Too Old, No Replies

Block referer SPAM using httpd.conf directly

I have a list of referer SPAM sites...

         

iProgram

9:27 am on Mar 19, 2006 (gmt 0)

10+ Year Member



I define the referer SPAM sites using the following logic:

1. Read the referer site list in my AWSTATS report
2. Visit thoes sites and find my domain.com in their source codes
3. If I could not find my domain.com in its source code, then the site is a referer SPAM site.

Now assume I have a list of referer sites and what is the best rewrite syntax to block them? I do not want those BOTs use up my httpd connections at all (something like keepalive) so I think it not as simple as blocking referer env.

Btw, I do not want to append new code to all my .htaccess files, so is there a way to insert some RewriteCond code to httpd.conf directly?

jdMorgan

2:35 am on Mar 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> all my .htaccess files

Are we talking about multiple sites here, or just one?

You can block accesses at the firewall (if you have access to a modern and sophisticated firewall), or you can use IPfilters, IPchains, or IPtables at the OS level. Any method implemented in httpd.conf or .htaccess will use a server thread, because they are invoked *while serving a request* -- In other words, at that point, they are already using a connection to your server.

Jim