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]

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