在项目根目录下有个文件:.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>
若没有效果,可将
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
改为
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
尝试。