server {
        listen 80;
        server_name *.olddomain.com;
        if ( $http_host ~* "^(.*?)\.olddomain\.com$"){
            set $domain $1;            
        }
        rewrite ^/(.*) http://$domain.newdomain.com/$1 permanent;
    }

 

相关文章:

  • 2020-04-12
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2021-11-11
  • 2021-10-26
  • 2021-07-10
猜你喜欢
  • 2021-06-04
  • 2021-06-09
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2021-08-02
  • 2021-12-28
相关资源
相似解决方案