http跳转https

 server {
        listen 80;
        server_name 你的网页地址;
        rewrite ^(.*) https://你的网页地址$1 permanent;
        }

匹配路径https://你的网页地址/activity/14286.html   转发到路径https://你的网页地址/pages/activity/detail?id=14286 


 location ~* ^/(activity/)(.*)(\.html)$ {
               rewrite ^/(activity/)(.*)(\.html)$ https://你的网页地址/pages/activity/detail?id=$2;
        }

以上是参考例子 正则匹配规则请参考官方文档

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐