I have a contact page on one of my sites that I only want people from my state to be able to view. Is there anyway to ban all other ips on any certain page and allow only specific ones from a certain area? Also I would need to have a notice why they have been banned. Thanks so much.
there is a way to ban / allow ips via .htaccess not sure how its done maybe you search google for it. EDIT after a quick search i believe the code for htaccess will look something like <Limit GET> order allow,deny deny from 123.123.123.123 deny from 456.456.456.* deny from 789.789.*.* allow from all </Limit> Code (markup): the above will block ips on that range and allow all the rest or <Limit GET> order allow,deny allow from 123.123.123.123 allow from 456.456.456.* allow from 789.789.*.* deny from all </Limit> Code (markup): would do the opposite
And how do I know what to enter just for my state alone? I know nothing about htaccess and hopefully can figure this out. Also will I be able to put up a notice that you have been banned from veiwing this form b/c ect along with that?
these should help in terms of .htaccess http://www.webdeveloper.com/servers/servers_htaccess_magic.html http://www.devwebpro.com/devwebpro-39-20030416htaccess-Magic.html i dunno the ips of states so cant help there, you might be able to restrict to certain countries but i dunno how you would get a list of ips for your state, and yes you can create a custom page i think its a 401 page (un-authorise??) and would be named 401.shtml and would be placed in the directory root hope that helps
There is no way you can do this by putting a few entries in your .htaccess file, or configuring IIS properly if you are on a Windows server. There are products available that you can use programatically to determine an approximate geographic location based on a user's IP address. NONE of these products are 100% correct, however. I've found that the BEST ones (which are very costly) are about 75% correct. What I would suggest is developing this page and integrate it with one of these products to determine the users location. If they are not located in your state you could display the ban page, if not display the form. Since these products are not 100% correct, however, you'll surely end up blocking a small amount of users in your local state. I would suggest providing a way to get to the form even IF the code determines that they reside in your local state. I'd be more than willing to assist you with this project. Let me know if you are interested.
Its almost impossible to use Geo IP at the state level. Examples are: - AOL (all traffic looks like it comes from Northern Virgina). - ISPs that do not segment their IP address space. - ISPs that use proxy servers located in a different state. - Anonymous proxy servers. What is your application written in? If it was Mambo or Drupal or some other CMS you should be able to do this with the built in access control / user rights to create pages that only certain users can see. -jay
Hmm not so good if 100% percent but I can understand why. I really cant reveal the nature of what I am trying to do. If not 100% probably no use even thinking about it. I am marketing my site to a certain type of person and didnt want others to contact me outside of the state. This probably all sounds strange and I suppose it probably is a strange project. I also wouldnt be able to afford to pay for any software. (IT) if you still want to take a look pm me and Ill send you the link. Thanks.
You can't rely on what people fill out in a form (when they creat an account, etc.) because there may be people who do want to get to the form who are not really geographically located in your state. Have you thought of some sort of manual validation process you could put in place to validate a user is actually located in a specific state?
You could - require they send you a copy of a utility bill (power, phone, gas). - charge them a very small membership fee via credit card and use billing address verification. - postal mail them an activation post card. - have them enter a phone number (not a cell phone) and 1). call it to verify and 2). look up what state its located in via the reverse lookup. I'm sure there are other methods but it really depends on how valuable each registered user is and how much trouble you are willing to go through. The more barriers you place between registration and use of the site the fewer members you will have. -jay
Do you have any way you could validate a user is from your local state? Faxing/mailing a copy of their photo ID after signing up, etc? That typically doesn't work well, but it may depending on what type of site you have.