Block traffic from an entire state?

Discussion in 'Site & Server Administration' started by chaos, May 20, 2008.

  1. #1
    Is there a way to block traffic from a certain state from viewing my website?
     
    chaos, May 20, 2008 IP
  2. relixx

    relixx Active Member

    Messages:
    946
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    70
    #2
    You can block a country because each one is assigned a block of IPs to use. Unless America has a similar policy for states (which I doubt) this'd be impossible.

    You also can't really do accurate geo-ip targeting due to use of proxies by many ISPs. You could probably block any proxies located in that state, seeing how ppl would be diverted to that one, but this wouldnt be a universal solution as it depends on the the ISP.

    long story short, highly unlikely and not worth the effort trying.
     
    relixx, May 20, 2008 IP
  3. and_y

    and_y Active Member

    Messages:
    287
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #3
    You may ban IP's editing the .htaccess file. Check this link out aaronlogan.com/downloads/htaccess.php
    Hope it may help you
     
    and_y, May 20, 2008 IP
  4. phplife

    phplife Peon

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You might have to purchase a geo/ip database and go from there. If zip codes are consistent throughout the state, then it is possible. When you find the geo/ip database, you could also do it by longitude and latitude.

    The get a script to check the database against the browser's ip address. Chose to redirect/block.

    phplife
     
    phplife, May 20, 2008 IP
  5. ChrisMiller

    ChrisMiller Prominent Member

    Messages:
    1,934
    Likes Received:
    81
    Best Answers:
    0
    Trophy Points:
    315
    #5
    why do you want to ban a state from viewing your website you offering something not to legal?
     
    ChrisMiller, May 20, 2008 IP