ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

.htaccess for heading off spambots

May 26, 2009 5:53pm

Subscribe [1]
  • #1 / May 26, 2009 5:53pm

    smidoid

    36 posts

    This isn’t a perfect solution, but I hope it can help someone else - the idea is to head off some spambots before they hit your site or even get as far as Bad Behavior (which is quite superb, BTW).

    It looks like this:

    RewriteCond %{REMOTE_ADDR} ^64.140.49.6([6-9])$ [NC,OR]
    RewriteCond %{REMOTE_ADDR} ^85.114.141.114$ [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} ^NPBot [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtractor [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO [NC,OR]
    
    #### --- etc. --- 
    #### and then pokes them in the eye with a forbidden header.
    
    RewriteCond %{HTTP_USER_AGENT} ^[a-z]+$ [NC]
    RewriteRule ^.* - [F,L]

    See attached for the full code. As ever, your mileage may vary… (mine certainly does).

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases