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