if ($host ~* "^(www.)?旧域名$") {
return 301 $scheme://新域名$request_uri;
}
if ($host = "daohw.fengye.wang") {
if ($request_uri = /api/ipCard) {
return 301 https://xxxx.com/api/ipCard$is_args$args;
}
}
# 处理所有变体(路径包含子目录/参数等情况)
location /api/ipCard {
if ($host = "daohw.fengye.wang") {
return 301 https://xxxx.com$request_uri;
}
}
location ~* ^/api/(ipCard|otherPath) {
return 301 https://xxxx.com$request_uri;
}
if ($host = '旧域名') {
return 301 $scheme://新域名$request_uri;
}
扫描二维码,在手机上阅读
版权说明
文章采用: 《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权。版权声明:未标注转载均为本站原创,转载时请以链接形式注明文章出处。如有侵权、不妥之处,请联系站长删除。敬请谅解!
lrzy8.com