Skip to content

Instantly share code, notes, and snippets.

@RobDWaller
Last active September 21, 2018 06:27
Show Gist options
  • Save RobDWaller/4aaf07a5e714370ee2404befbe3749ae to your computer and use it in GitHub Desktop.
Save RobDWaller/4aaf07a5e714370ee2404befbe3749ae to your computer and use it in GitHub Desktop.
Nginx 301 SSL Redirect Server Block
server {
listen 80;
server_name www.website.com website.com;
if ($args) {
return 301 https://website.com$uri?$args;
}
return 301 https://website.com$uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment