Is there a way I can automatically restrict/deny access to my website from certain regions/locations (states/parts of states), possibly by redirection?
I am not looking for a password solution; it’s already one of those kinds of sites ;-)
For example, say I wanted anyone from Iowa (Just an example, I have nothing against Iowa) who tries to access my site to get automatically redirected to somewhere else, say Google, while everyone else just goes through.
I know I can restrict IP addresses through htaccess on an individual basis, but that’s not what I’m looking for either. I’m also not looking for putting something on my site that says “If you are from anywhere other than Iowa, click here to enter: Iowans or Iowites or Iowers, click here to exit”
You know those little messages that some people put in their sig lines and such that say something like “Hi, you are using Windows XP, your browser is Firefox, your IP address is 12.34.56.78 and you are located in Iowa.” I was thinking of something that looks at that same kind of information, but redirects the user when it sees Iowa in the location. But thats just me thinking out loud.
I know that this type of solution could be/would be gotten around by using a proxy, but I’m ok with that.
I was hoping there was something I could put in the code of my index page or something along those lines.
Free and paid solutions are both cool (but free solutions are cooler).
Bonus points for solutions that are more targeted than just states (say, Northwest Iowa or Des Moines)
Again, nothing against Iowa, its just 4 characters long and easier to type than say, Mississippi.
(Nothing against Mississippi, either!)
MaxMind provides GeoIP databases, there are probably others.
posted by justkevin at 6:30 AM on December 8, 2005