Writing /data1/apache/share/htdocs/wiki/data/cache/1/184675902ba423f3532d95888f0ef97d.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /data1/apache/share/htdocs/wiki/data/cache/1/184675902ba423f3532d95888f0ef97d.metadata failed
Writing /data1/apache/share/htdocs/wiki/data/meta/nginx/rewrite%E8%AF%AD%E6%B3%95.meta failed
 
Writing /data1/apache/share/htdocs/wiki/data/cache/1/184675902ba423f3532d95888f0ef97d.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /data1/apache/share/htdocs/wiki/data/cache/1/184675902ba423f3532d95888f0ef97d.xhtml failed

nginx的rewrite规则参考

  • ~ 为区分大小写匹配
  • ~* 为不区分大小写匹配
  • !~和!~*分别为区分大小写不匹配及不区分大小写不匹
  • -f和!-f用来判断是否存在文件
  • -d和!-d用来判断是否存在目录
  • -e和!-e用来判断是否存在文件或目录
  • -x和!-x用来判断文件是否可执行
  • last 相当于Apache里的[L]标记,表示完成rewrite,呵呵这应该是最常用的
  • break 终止匹配, 不再匹配后面的规则
  • redirect 返回302临时重定向 地址栏会显示跳转后的地址
  • permanent 返回301永久重定向 地址栏会显示跳转后的地址
nginx/rewrite语法.txt · 最后更改: 2019/12/08 02:15 (外部编辑)
 
除额外注明的地方外,本维基上的内容按下列许可协议发布: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki