Forum Moderators: phranque
Edit:
Oh, oops, this is wrong:
46\.165\.(19[2-9]|2[0-5][0-5])\.
It wouldn't match, for example, 249. If you don't want to go the 2\d\d route the parenthesised bit would have to be
(19[2-9]|2[0-4]\d|25[0-5])
The easiest way to locate a syntax error that is cascading is to break your htaccess down into multiple sections.
I don't understand what you're saying. What does "omit" mean?
These 700 lines are divided into 16 sections
Gee, don't you wish your host would move up to 2.4 so you could shovel it all inside <If> envelopes instead?
I don't need to list very many things twice
SetEnvIf Remote_Addr ^5\.(16[4-7]|228) bad_russia
SetEnvIf Remote_Addr ^64\.2(6|47\.1[2-5]\d) qiniq
* so the Regular Expression executes just once-and-for-all on each request. Then you make rules involving RewriteCond %{ENV:bad_russia} .
(single dot simply meaning "this environmental variable exists") with further conditions. Allowable time to edit post has past.
But if I comment out...
RewriteCond %{REMOTE_ADDR} ^50\.116\.([0-9]|[1-5][0-9]|6[0-3])\. [OR]
...then I unblock the range, which is Linode. That beneficial agent comes about twice a week. Bad agents from that range come several times a day, every day.
the addition of the second mention may be confusing the server.
Mozilla/5.0 (compatible; SomeoneImportantBot/1.0) Mozilla/5.0 (compatible; SomeoneImportantBot/1.0; support@someoneimportant.com http://someoneimportant.com/)