Apache、IIS、Nginx等絕大多數web服務器,都不允許靜態文件響應POST請求,否則會返回“HTTP/1.1 405 Method not allowed”錯誤。
server {
listen 80;
server_name 域名;
location /{
root /www/文件目錄;
index index.html index.htm index.php;
error_page 405 =200 http://$host$request_uri;
}
}
