redirect script according to ip

Discussion in 'Noob Central' started by noobking, Aug 12, 2012.

  1. noobking

    noobking Member

    Joined:
    Nov 28, 2011
    Messages:
    209
    Likes Received:
    6
    Trophy Points:
    18
    I'm currently mailing some CPC offers but i got lots of bots clicks.

    My platform can blacklist IPs but according to some threads here, I see the best method is to redirect them to a static page.

    Is there any script can redirect affiliate link based on IPs, or we can do it on DNS level?

    and what kind of page should I redirect those bots clicks to?

    Thanks very much,
    noobking
     
  2. DaMadHatter

    DaMadHatter Active Member

    Joined:
    Mar 1, 2011
    Messages:
    722
    Likes Received:
    51
    Trophy Points:
    28
    Location:
    In the Void
    You would want to talk to Damian of D.A. and he can answer that for you easily enough.

    :smokin:
     
  3. noobking

    noobking Member

    Joined:
    Nov 28, 2011
    Messages:
    209
    Likes Received:
    6
    Trophy Points:
    18
    your reply is so fast!
     
  4. DaMadHatter

    DaMadHatter Active Member

    Joined:
    Mar 1, 2011
    Messages:
    722
    Likes Received:
    51
    Trophy Points:
    28
    Location:
    In the Void
    I know Damian has talked on this topic before. I can't recall the answer atm, but I know he has it.

    :star:
     
  5. noobking

    noobking Member

    Joined:
    Nov 28, 2011
    Messages:
    209
    Likes Received:
    6
    Trophy Points:
    18
    I found that thread, but not talked about how to:shot:
     
  6. nickphx

    nickphx VIP

    Joined:
    Apr 2, 2011
    Messages:
    1,294
    Likes Received:
    430
    Trophy Points:
    83
    Gender:
    Male
    Location:
    phoenix.
    You would just do it with a simple php script..
     
  7. noobking

    noobking Member

    Joined:
    Nov 28, 2011
    Messages:
    209
    Likes Received:
    6
    Trophy Points:
    18
    yeah, I know it's easy to handle it on single link.

    I just want to solve this problem automatically
     
  8. nickphx

    nickphx VIP

    Joined:
    Apr 2, 2011
    Messages:
    1,294
    Likes Received:
    430
    Trophy Points:
    83
    Gender:
    Male
    Location:
    phoenix.
    What web server software are you using to handle hosting? If it's apache or nginx, you could handle it with a few rewrite rules and not have to worry about scripts.. If it's IIS, have fun with that.
     
  9. sjinks

    sjinks VIP

    Joined:
    Apr 27, 2011
    Messages:
    301
    Likes Received:
    31
    Trophy Points:
    28
    Location:
    Sevastopol, Ukraine
    Home Page:
    http://blog.sjinks.pro/
    Apache:
    Code:
    RewriteCond %{REMOTE_ADDR} ^12\.3[45]\. [OR]
    RewriteCond %{REMOTE_ADDR} ^34\.(5[6-9]|6[0-3])\. [OR]
    RewriteCond %{REMOTE_ADDR} ^56\.2[78]\.
    RewriteRule .* http://www.google.com/ [R=301,L]
    
    nginx:

    Code:
    geo $ip_bad {
        ranges;
        default 0;
        1.2.3.4-1.2.3.255 1;
        2.3.4.5-3.4.5.255 1;
    }
    
    if ($ip_bad) {
        rewrite .* http://google.gom/ redirect;
    }
    
     
  10. chaseideas

    chaseideas New Member

    Joined:
    Sep 27, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
  11. noobking

    noobking Member

    Joined:
    Nov 28, 2011
    Messages:
    209
    Likes Received:
    6
    Trophy Points:
    18
    thanks,sjinks and chaseideas
     

Share This Page