默认的重写规则
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
在fastcgi模式下会出现No Input File Specified 或者 404错误,修改为:
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
fastcgi模式下,全部规则:
<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>