在public文件夾下,有個.htacess文件,沒有則新建一個, 如果已有這個文件,原文件內容如下:
<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?s=$1 [QSA,PT,L]
即可!