0

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]
4

1 回答 1

1

这个似乎只匹配/

RewriteEngine on
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} /$
RewriteRule ^ /$ [F]
于 2013-10-10T19:34:23.627 回答