I'm getting about 40 requests per minute from what's apparently a botnet DoS where a "POST / HTTP/1.1" is being sent to the server and its enough to crash the web-app fronted by Apache2, but certainly not enough to crash the server nor Apache2. I want to add a rewrite rule to basically 403 the POST action immediately in Apache, but I'm matching POST to all pages, not just "/". Here's my code attempt so far:
RewriteEngine on
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^ /$ [F]