Skip to content

Commit

Permalink
[www_redirect_use_base_domain] Redirect to www.{{nginx_base_domain}
Browse files Browse the repository at this point in the history
If nginx_server_name is www.example.com, if someone goes to http://example.com/ they should be redirected to http://www.example.com/ - not http://www.www.example.com
  • Loading branch information
oskarpearson committed Mar 28, 2015
1 parent dce91b4 commit 9701f89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/nginx_sites-available.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ map $scheme $sts {
server {
listen {{ nginx_listen }};
server_name {{ nginx_base_domain }};
return 301 $scheme://www.{{ nginx_server_name }}$request_uri;
return 301 $scheme://www.{{ nginx_base_domain }}$request_uri;
}
{% endif %}

Expand Down

0 comments on commit 9701f89

Please sign in to comment.