apache:
<IfModule mod_rewrite.c>
Options +FollowSymli
RewriteEngine On
Rewriteba
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
nginx,rewrite重写index.php,但是另外一个Rewriteba
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
最佳答案