Am receiving annoying accesses from the user_agent which has only one letter, say a, i, o or x. Want to block those accesses using SetEnvIf, like following lines in httpd.conf:
———- snip ———-
SetEnvIf User_Agent “^.$” reject
SetEnvIf User_Agent “^w$” reject
<Directory “d:/foo”>
Require not env reject
Require all granted
——— snip ———
There are many other SetEnvIf settings, and all of them work correctly, except above two cases.
Httpd is Apache 2.4 on Windows 10.
What am I doing wrong? Any helps appreciated.
Tak
Tried “^.$” , “.” in vain.
Expected response 403, but accepted(200).
Tried the regex in Regex101.com and RegExr.com sites, with good results.