宝塔带有设置伪静态写入地方,但是规则需要自己写
如果是Nginx填入
1 2 3 4 | if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break;} |
如果是Apache填入
1 2 3 4 5 6 7 | <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]</IfModule> |
如果是IIS填入