代码片
去宝塔页面 > 网站 > 子网站 > 设置 > 伪静态
// 设置伪静态代码
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
保存即可.
示例:
https://域名/index.php/admin/user/index.html
https://域名/admin/user/index.html
去宝塔页面 > 网站 > 子网站 > 设置 > 伪静态
// 设置伪静态代码
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
保存即可.
示例:
https://域名/index.php/admin/user/index.html
https://域名/admin/user/index.html