比如URL: /a/b/c
/a/b/c
期望效果:
POST: /a/b/c SUCCESS
GET: /a/b/c 404
请问怎么写nginx规则呢?
server { location /a/b/c { if ($request_method !~* POST) { return 404; } } }
2.1m questions
2.1m answers
60 comments
57.0k users