apache隐藏啦index.php tp5路径报错问题

官方手册提供的.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>

这种情况下可能会出现:No input file specified 的错误

解决方法:

      将:RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章