4

I understand it is possible to block a country from viewing my website using apache, .htaccess.

I was wondering if it is possible to block everyone from a specific City (namely the city of Flower Mound, in Texas) from accessing my website. If that's a no-go, how about blocking all of Texas?

Edit - the reason why. There is a competitor company that is based in Flower Mound. I want them to think my website is down/offline. cough dirty..i know

2nd Edit - I do this because they tend to steal my work, change it in some way, and then call it their own. They are quite adept in doing this, and I can't call upon the law for help.

10
  • 3
    I'd love to know why!
    – Rich
    Dec 10, 2010 at 13:04
  • 1
    +1 for why. this sounds like a great story.
    – Sirex
    Dec 10, 2010 at 13:05
  • What has Flower Mound done to you ?
    – user9517
    Dec 10, 2010 at 13:05
  • 1
    But think of the children!
    – GregD
    Dec 10, 2010 at 13:05
  • 3
    On a personal note, if I knew what your company was in the business of doing, knowing what you've asked here, I would not purchase a damn thing from you.
    – GregD
    Dec 10, 2010 at 13:30

1 Answer 1

2

It's technically not possible to block 100% of all users in $CITY/$STATE/$COUNTRY . Reasons:

  • Proxy servers
  • Satellite connections
  • Inaccurate/too-infrequently updated geolocation databases

How about finding out which ISP your competitor uses and then block an IP-range of that ISP used in the city?

If you want to try blocking the city nonetheless, take a look at mod_security +GeoIP (assuming you're using Apache).

Funny question/idea btw ;-)

3
  • Any tip on how I can find out what ISP they use? I personally live in Canada, but I can get someone from Flower Mound to enter their company headquarters with a wireless laptop, if that helps any... Dec 10, 2010 at 13:20
  • Well I don't want to support illegal actions, but here are some keywords: WHOIS lookup, netcraft, DNS queries (dig, nslookup) etc.
    – weeheavy
    Dec 10, 2010 at 13:25
  • 1
    ... or just email them and start by the mail headers of the reply.
    – Sirex
    Dec 10, 2010 at 15:40

Not the answer you're looking for? Browse other questions tagged .