Nginx常用Rewrite伪静态法则

时间:2016-04-16 08:23:50
【文件属性】:
文件名称:Nginx常用Rewrite伪静态法则
文件大小:6KB
文件格式:TXT
更新时间:2016-04-16 08:23:50
Nginx Nginx常用Rewrite伪静态法则 信赖此刻大部门用Linux VPS的伴侣都在利用这个敏捷传布的Nginx,本日就清算一下最常见的PHP法式的Rewrite(伪静态法则)。 Wordpress: location / { index index.html index.php; if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } }

网友评论