Web Hosting Talk







View Full Version : Block access to site


mv808
01-31-2007, 02:10 AM
How do i block a certain city from accessing my site? Do you put some kind of code on every page, or is it done through cpanel? Thanks.

Jeremy
01-31-2007, 04:15 AM
By city might be kinda hard...

You can block by IP with a .htacces

http://www.clockwatchers.com/htaccess_block.html

Monkeywork
01-31-2007, 08:56 AM
Sadly it not really possible to block people from certain cities, you can as suggested above easily block IP ranges via Apache .htaccess file.

What are you reasons for wanting certain cities being banned from your site? Would it not be simpler to restrict content to registered members?

That way you would be able to easy filter out anyone who shouldnt be viewing the content you have on display.