Forum Moderators: open
Educate me please, why?Deny from 198.27.64.0/18 has been the most common method used on Apache servers when they are not private servers, when access is managed in .htaccess and CIDR is the 'efficient' way to block all IPs in a given range.
CIDR is the short for Classless Inter-Domain Routing, an IP addressing scheme that replaces the older system based on classes A, B, and C. A single IP address can be used to designate many unique IP addresses with CIDR.-- from https://www.ipaddressguide.com/cidr which is an online calculator I use for such tasks.
your entry would definitely have borked my sitesThis seems to have been a change between 2.2 and 2.4. In 2.2, if you had anything in an Allow/Deny line that couldn't be read as a CIDR, the entire site went into lookups mode: for example
deny from 198.27.64.0 - 198.27.127.255
and nothing broke? I’m stumped. Maybe it interprets the hyphen in some weird way. If so, you’re blocking only the exact IP 196.27.64.0, which will not melt your server but is certainly not what you want. That looks fine.
PS: You can't bork a server in the way we have ours setup.
You can't bork a server in the way we have ours setup.No matter how a server is configured: if it supports htaccess it is always possible to do something that results in a 500 error. Not for the entire server, just for the directory subject to the htaccess file. In fact if you’re very clever* you can write code that results in a 500 error only on those requests that the code applies to; I achieved this once on a RewriteRule.
As a general rule, few hosts have understanding of htaccess, which is surprising.