Apache 2: SetEnvIf "IP Range"
- by BlaM
In my Apache config I want to set an environment variable if I see that the visitor comes from an specific IP range. Currently I do it this way:
SetEnvIfNoCase Remote_Addr "^194\.8\.7[45]\." banned=spammer-ip
SetEnvIfNoCase Remote_Addr "^212\.156\.170\." banned=spammer-ip
What I would prefer is something like this:
SetEnvIfIpRange 194.8.74.0/23…