#### 配置伪静态
直接选择宝塔伪静态规则如图(Apache nginx 同理,可在宝塔直接选择)
![](https://img.kancloud.cn/95/3d/953d2ca3bce3808178abc84edf35958a_783x625.png)
[Nginx]
location / { // …..省略部分代码
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
[Apache]
<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>