server { listen 80; server_name *.olddomain.com; if ( $http_host ~* "^(.*?)\.olddomain\.com$"){ set $domain $1; } rewrite ^/(.*) http://$domain.newdomain.com/$1 permanent; }
nginx 实现所有的子域名301跳转到另外一个域名的对应子域名
猜你喜欢
转载自www.cnblogs.com/jackspider/p/10100927.html
今日推荐
周排行