Difference between revisions of "Return (nginx.conf)"

From wikieduonline
Jump to navigation Jump to search
Line 9: Line 9:
 
     [[return 301]] https://$host$[[request_uri]];
 
     [[return 301]] https://$host$[[request_uri]];
 
  }
 
  }
 +
 +
https://stackoverflow.com/questions/45318758/nginx-variable-for-subdomain
 +
server {
 +
    [[listen]]      80;
 +
    server_name  ~^(?<name>.+)\.example\.com$;
 +
    [[return]]      301 http://example.com/$name$[[request_uri]];
 +
}
 +
  
  

Revision as of 17:51, 26 August 2021

Advertising: