•location映射(ngx_http_core_module)
– location [ = | ~ | ~* | ^~ ] uri { ... }
– location URI {}:
– 对当前路径及子路径下的所有对象都生效;
– location = URI {}: 注意URL最好为具体路径。
– 精确匹配指定的路径,不包括子路径,因此,只对当前资源生效;
– location ~ URI {}:
– location ~* URI {}:
– 模式匹配URI,此处的URI可使用正则表达式,~区分字符大小写,~*不区分字符大小写;
– location ^~ URI {}:
– 不使用正则表达式
– 优先级:= > ^~ > ~|~* > /|/dir/
–/loghaha.html
–/logheihei.html
–^/log.*html$

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-08
  • 2022-02-19
  • 2021-09-03
  • 2021-05-10
  • 2021-05-27
  • 2022-12-23
猜你喜欢
  • 2021-05-27
  • 2021-10-11
  • 2021-06-05
  • 2022-01-12
  • 2021-06-17
  • 2021-11-09
  • 2021-12-24
相关资源
相似解决方案