比如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; } } }
548k questions
547k answers
4 comments
86.3k users