Welcome to WebmasterWorld Guest from 184.108.40.206 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor
IP ranges in .htaccess Jordo needs a drink msg:3283470 5:56 am on Mar 16, 2007 (gmt 0) Can you block ip ranges in the .htaccess like
deny from ###.###.###.### - ###.###.###.###?
I thought you could, but I have ip's accessing a site, that are in the range I blocked.
SteveWh msg:3283526 8:17 am on Mar 16, 2007 (gmt 0)
Yes you can, but not using that format. Search for "CIDR" or "netmask". coopster msg:3283661 11:50 am on Mar 16, 2007 (gmt 0)
Details on how to do so can be found in the Apache manual pages under the Allow [ httpd.apache.org] directive. trillianjedi msg:3283665 12:00 pm on Mar 16, 2007 (gmt 0)
I don't mean to take this off track, but blocking a range of IP's, if for the long term, is much more efficiently handled in IPtables (or your firewall if this is a Windows server).
jdMorgan msg:3283838 2:47 pm on Mar 16, 2007 (gmt 0)
> off track
most Webmasters are on shared virtual hosting, and have no access to IPtables, firewalls, or anything beyond the limited .htaccess controls -- Which is why we do a big business here in .htaccess issues, and relatively little in server config discussion.
As stated above, the documentation for the
Allow directive in mod_access enumerates the various methods for specifying IP address ranges.