将public文件夹下的.htaccess文件
Options+FollowSymlinks -Multiviews
RewriteEngineOn
RewriteCond%{REQUEST_FILENAME} !-d
RewriteCond%{REQUEST_FILENAME} !-f
RewriteRule^(.*)$ index.php/$1 [QSA,PT,L]
改为如下
Options+FollowSymlinks -Multiviews
RewriteEngineOn
RewriteCond%{REQUEST_FILENAME} !-d
RewriteCond%{REQUEST_FILENAME} !-f
RewriteRule^(.*)$ index.php [L,E=PATH_INFO:$1]
或者
Options+FollowSymlinks -Multiviews
RewriteEngineOn
RewriteCond%{REQUEST_FILENAME} !-d
RewriteCond%{REQUEST_FILENAME} !-f
RewriteRule^(.*)$ index.php?/$1 [QSA,PT,L]