0
点赞
收藏
分享

微信扫一扫

Nginx配置从域名A跳转到域名B

Nginx配置从域名A跳转到域名B

需求:已经有一个域名​​https://a.cn​​,然后想让访问a域名的直接访问​​https://b.cn​​

​**这里需要在A服务器的Nginx配置。**​

配置

location /xxx {
root /usr/local/nginx/html;
rewrite ^(.*) https://b.cn$1 permanent;
}


举报

相关推荐

0 条评论