View Single Post
  #18 (permalink)  
Old 03-11-2009, 04:25 AM
Clint1's Avatar
Clint1 Clint1 is offline
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Jun 2005
Location: Louisiana, USA
Posts: 1,318
Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9
Default Re: Blocking non-US IPs?

Quote:
Originally Posted by NetProwler View Post
There is a caveat when you use the Apache's directives in a .htaccess file to allow only the US IP address. The directives run to a few thousand lines. Your HTTP server has to process this for every visitor and that can slow down your server. The best place to block unwanted elements is at the firewall.

For dynamic sites, extra load involved in processing long .htaccess files can sometimes result in transient overload.
That will only work if you "have your host's ear" and they'll add IP addresses to the server's firewall at each of your requests. Or, if you have your own personal server.

I'm no expert on Apache nor htaccess, but adding a new entry is only:
deny from x
Where "x" is the IP address, or partial address. Are you saying that creating one of those adds thousands of other lines elsewhere? The block only applies to PC with the tagged IP.
__________________
God Bless,
-Clint
(Join Date: 2003)
Reply With Quote