nginx 根据域名和地址跳转

设置nginx变量

set $domail_url "$host$request_uri";

判断并重定向
if ($domail_url = '123.com/about/'){
       rewrite ^/(.*)$ http://123.net/$1 permanent;
}

猜你喜欢

转载自www.cnblogs.com/liliuguang/p/10064053.html
今日推荐