宝塔用户_txwwnc 发表于 2021-6-29 14:33:44

【已解答】宝塔面板的路径301跳转不生效是什么原因呢?


http://www.sifuddg.com/xinwendongtai/52.html跳转到新的页面http://www.sifuddg.com/a/ddgxw/52.html;是不是我操作有什么问题呢?
有大佬可以告诉我一下吗?


大炮运维V587 发表于 2021-6-29 15:46:14

宝塔用户_txwwnc 发表于 2021-6-29 14:35
在网上也找不到解决方法

您好,路径跳转不是具体的url跳转,如您不懂或者不会,可以参考下nginx中文教程。https://www.nginx.cn/doc/general/overview.html

如果只想这个http://www.sifuddg.com/xinwendongtai/52.html url 跳转,
location= /xinwendongtai/52.html {
        proxy_pass http://www.sifuddg.com/a/ddgxw/52.html;

如果是整个路径/xinwendongtai/
location ~ ^/xinwendongtai/ {
        proxy_pass http://www.sifuddg.com/a/ddgxw/52.html;
}

宝塔用户_txwwnc 发表于 2021-6-29 14:35:04

在网上也找不到解决方法
页: [1]
查看完整版本: 【已解答】宝塔面板的路径301跳转不生效是什么原因呢?