From cc4b9615f7bc2cc7b7f8ef1fa816d18ee8f36e9f Mon Sep 17 00:00:00 2001 From: drdla Date: Sat, 1 Sep 2012 18:52:55 +0300 Subject: [PATCH] Update templates/vhost/vhost_footer.erb --- templates/vhost/vhost_footer.erb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/vhost/vhost_footer.erb b/templates/vhost/vhost_footer.erb index 5c34318c2..1d2f0c3bb 100644 --- a/templates/vhost/vhost_footer.erb +++ b/templates/vhost/vhost_footer.erb @@ -1 +1,9 @@ } + +<% if rewrite_www_to_non_www %> +server { + listen <%= listen_ip %>; + server_name www.<%= name.gsub(/^www\./, '') %>; + rewrite ^ http://<%= name.gsub(/^www\./, '') %>$uri permanent; +} +<% end %>