I am seeing an usually high number of HTTP POST requests on my website, and I was wondering: Is there any way to block a POST request on a particular php page by making modifications to either the php file or .htaccess file? Thanks in advance!
if ($_SERVER['REQUEST_METHOD']) == 'POST') die();
POST /test HTTP/1.1 Host: foo.example Content-Type: application/x-www-form-urlencoded Content-Length: 27
field1=value1&field2=value2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.