Forum Moderators: phranque
RewriteCond %{QUERY_STRING} foo|bar [NC]
RewriteRule ^ - [F] They're (in theory) being blocked via Apache, but they're still showing up in the logs and spiking the load.That's in the nature of logs. They show all requests, regardless of response. It's only a cause for concern if blocked requests are showing up as 200, meaning that the 403 is issued by something other than the config file.
When the mod_security2 module is added on one of our servers, we automatically install it with the OWASP Core Rule Set (CRS). OWASP CRS is a list of rules created for WAFs and protects against a variety of common attacks, like SQL injection, cross-site scripting, and local file inclusion.