How to block Reffer from .htaccess

Discussion in 'Security' started by sweta.singh.98, Jan 12, 2010.

  1. #1
    hi

    I have a website but 2 from to days i have found high server load Mysql is taking all load. After checking referrer i found a referrer http://earn.nets.hk/?a=n and its reflecting from different ips and any body have knowledge about this what is this and how i can block this permanently i have blocked it from .htaccess . Is this a permanent solution or i have to do some thing else

    Thanks
     
    sweta.singh.98, Jan 12, 2010 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    For a single referrer - different IPs but same domain name as referrer - try below:

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} ^http://earn\.nets\.hk [NC]
    RewriteRule .* - [F]

    you find more htaccess help here if you need more complex solutions
    http://www.htaccess-guide.com/
     
    hans, Jan 26, 2010 IP
  3. sweta.singh.98

    sweta.singh.98 Guest

    Messages:
    628
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3

    This is effective i have done this and get nice solution
     
    sweta.singh.98, Feb 3, 2010 IP