宝塔面板 Nginx 伪静态:将链接 http://baidu.com:6677/index.php?s=ruanjie_softbox/soft/soft_detail&id=1 转换为 http://baidu.com:6677/live_detail/1.html
要将链接 'http://baidu.com:6677/index.php?s=ruanjie_softbox/soft/soft_detail&id=1' 转换为 'http://baidu.com:6677/live_detail/1.html',您可以在宝塔面板的 Nginx 配置中添加以下规则:/n/nnginx/nlocation /live_detail/ {/n rewrite ^/live_detail/(/d+)/.html$ /index.php?s=ruanjie_softbox/soft/soft_detail&id=$1 last;/n}/n/n/n将以上代码添加到 Nginx 配置文件中,并重新加载 Nginx 配置即可实现链接的转换。请确保您在宝塔面板中正确配置了 Nginx 服务器和网站,并拥有对相应配置文件的写入权限。
原文地址: https://www.cveoy.top/t/topic/qkKq 著作权归作者所有。请勿转载和采集!