一般的伪静态是这样的
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
然后需要修改成下面这样
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L] //这行去掉
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
然后使用$this->request->param()获取的时候就不会多出路由了
0条评论