天天看點

Nginx配置從域名A跳轉到域名B

Nginx配置從域名A跳轉到域名B

需求:已經有一個域名​​https://a.cn​​,然後想讓通路a域名的直接通路​​https://b.cn​​

配置

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

繼續閱讀