From 38e7cc219464e81bad6606880e5448c0a672fe06 Mon Sep 17 00:00:00 2001 From: Peter Rhoades Date: Fri, 5 Jul 2013 15:46:53 +0100 Subject: [PATCH] Heavy handed removal of if block, this is not related to try_files addition --- modules/projects/templates/shared/nginx.conf.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/projects/templates/shared/nginx.conf.erb b/modules/projects/templates/shared/nginx.conf.erb index 7f6f1f1..590edbf 100644 --- a/modules/projects/templates/shared/nginx.conf.erb +++ b/modules/projects/templates/shared/nginx.conf.erb @@ -11,6 +11,11 @@ server { client_max_body_size 50M; error_page 500 502 503 504 /50x.html; + if ($host ~* "www") { + rewrite ^(.*)$ http://<%= @server_name %>$1 permanent; + break; + } + location = /50x.html { root html; }