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;
}
以上是参考例子 正则匹配规则请参考官方文档