TP5 apache服务器fastcgi模式下rewrite重写
默认的重写规则
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
在fastcgi模式下会出现No Input File Specified 或者 404错误,修改为:
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
fastcgi模式下,全部规则:
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
原文:https://www.cnblogs.com/djiz/p/14993401.html