Blocking spam IP in htaccess doens't work ... What's wrong ?

Discussion in 'robots.txt' started by Jona, Mar 9, 2007.

  1. #1
    I'm getting a loooot of hits from 192.17.240.28 (MQbot)

    So, I placed this line in my .htaccess file
    deny from 192.17.240.

    But I STILL getting all those hits from 192.17.240.28 ??
    What's wrong ?

    Below my complete .htaccess:

    It first stop image hotlinking, that looks like it's working even the
    nohotlink_large.gif image never show up if hotlinking ... Just broken image.
    Anyway, my problem is to block spam ip's, pls H E L P!

    -------------------------------
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?hotlib\.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/hotlinking/nohotlink_large.gif [L]
    # RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]

    # Block crawler boot that gives huge hits on our server
    deny from 192.17.240.


    I now also added this line to .htacess:
    RewriteCond %{HTTP_USER_AGENT} ^MQbot [OR]

    This is a line from my logfile:
    ------------------------------
    192.17.240.28 - - [09/Mar/2007:22:53:21 -0500] "GET /products1.php?id=16464 HTTP/1.1" 403 - "http://www.hotlib.com/all_programs.html" "MQbot http://metaquerier.cs.uiuc.edu/crawler"


    Since I have that deny line, should I still SEE any access from that IP in my logfile, or ?
     
    Jona, Mar 9, 2007 IP
  2. logodesignteam

    logodesignteam Peon

    Messages:
    188
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this

    order allow,deny
    deny from 192.17.240.
    allow from all

    and this should work

    If not let me know and I might have some more suggestions for you.
     
    logodesignteam, Mar 25, 2007 IP