比如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; } } }
1.4m articles
1.4m replys
5 comments
57.0k users