Different hitbot or what you call it problem.

Discussion in 'Apache' started by Andy$$$, Jun 5, 2007.

  1. #1
    I have a huge problem.

    Someone is sending tens of thousands of hits to my site with different IPs most of the time. Each requests is sent through several clickbank linkscodes.

    When I look in my logfiles I see that all hits go to this file first with the affiliate id after the =

    /hoplink.php?hop=affiliateid

    and then continue to / (hoplink.php sends them to /) and load all pictures etc. This takes a lot of resources from my server.

    Is there away to block all requests comming from "affiliateid"?

    Thanks in advance.
     
    Andy$$$, Jun 5, 2007 IP
  2. damonp

    damonp Peon

    Messages:
    97
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could do a mod_rewrite rule in a .htaccess file with a regex pattern match for anything with

    hop=affiliateid
    Code (markup):
    This would be similar to hotlink protection and just forward them to another page elsewhere or a new page on your site telling them to go away.

    Something like this ought to work:
    RewriteRule ^hoplink.php?hop=affiliateid$ /go-away.jpg
    Code (markup):
     
    damonp, Jun 6, 2007 IP
  3. Andy$$$

    Andy$$$ Peon

    Messages:
    205
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Damonp but I tried what you wrote but nothing happend. Really strange :) Perhaps there is an error in my server config for apache? or did an error sneak into your code?

    Thanks
     
    Andy$$$, Jun 9, 2007 IP
  4. papek

    papek Peon

    Messages:
    92
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks damonp for the idea. I learned the rest from FQA by Nintendo.

    Andy, I was working on the similar thing today and this works perfectly, I use the second option:

    RewriteEngine on
    RewriteBase /
    RewriteRule ^hoplink.php?hop=affiliateid$ http://www.domain.com/goaway.htm [R,NC]


    If you had the hoplink.php say in /scripts/ directory then add it in as per below:


    RewriteEngine on
    RewriteBase /scripts/
    RewriteRule ^hoplink.php?hop=affiliateid$ http://www.domain.com/goaway.htm [R,NC]
     
    papek, Jun 9, 2007 IP
  5. papek

    papek Peon

    Messages:
    92
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I just had a thought, try it also just with hoplink.php it might be better

    RewriteEngine on
    RewriteBase /scripts/
    RewriteRule ^hoplink.php$ [url]http://www.domain.com/goaway.htm[/url] [R,NC]
    Code (markup):
     
    papek, Jun 9, 2007 IP
  6. Andy$$$

    Andy$$$ Peon

    Messages:
    205
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi,

    thanks for all help but neither worked. I think it is the apache webserver that is messed up. But I'm moving to a new host now anyway so I'll just make sure the apache works as it should on the new one.

    andy
     
    Andy$$$, Jul 17, 2007 IP