Skip to content

Instantly share code, notes, and snippets.

@hsleewis
Created November 30, 2017 09:55
Show Gist options
  • Save hsleewis/ee74e11553219a7124bb254b42f05ca3 to your computer and use it in GitHub Desktop.
Save hsleewis/ee74e11553219a7124bb254b42f05ca3 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name ^(?<realservername>pre.+\.domain\.tld)$;
return 301 https://$realservername$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment