View Single Post
  #2  
Old 06-22-2012, 01:38 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,217
I tested
SecFilterSelective HEADER_USER_AGENT "^$"
and
SecFilterSelective HEADER_USER_AGENT ""
not working.the test command is
#curl -A "" -I 127.0.0.1/test.html

however, if not empty, e.g.
SecFilterSelective HEADER_USER_AGENT "chome"
will work as expected -- will forbid Chrome browser to access.

however, you can use rewrite rule to archive the same goal, and much simpler.
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule . - [F]

rewriterule is widely used and well tested, it's simpler yet powerful.
Reply With Quote