标签:engine path_info multi filename 分代 nginx location tee iter
官方默认的。htaccess文件
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
如果用的是phpstudy
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
Nginx环境,可以在Nginx.conf
location /{//..... 省略了部分代码
if!(!-e $request_filename){
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
标签:engine path_info multi filename 分代 nginx location tee iter
原文地址:https://www.cnblogs.com/yang1com/p/9372823.html