thinkphp5和thinkphp3.2.3中URL重写出现No input file specified

查询后解决办法是打开public目录下的.htaccess文件,把:RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

改为:RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

 完整版:

<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>

转载自https://blog.csdn.net/dhywjx/article/details/79648160

猜你喜欢

转载自www.cnblogs.com/pangchunyu/p/10649372.html