From a4358a825de159a145b877c7b7d7c795c72cb3b4 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 25 Oct 2010 22:58:24 +0200 Subject: improve redirect, so we don't stick on the servername --- templates/vhosts/webdav/webdav.erb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'templates/vhosts/webdav') diff --git a/templates/vhosts/webdav/webdav.erb b/templates/vhosts/webdav/webdav.erb index ad0aba1..a4508b3 100644 --- a/templates/vhosts/webdav/webdav.erb +++ b/templates/vhosts/webdav/webdav.erb @@ -31,7 +31,9 @@ <%- end -%> <%- if ssl_mode.to_s == 'force' then -%> - Redirect permanent / https://<%= servername %>/ + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L] <%- end -%> <%- if default_charset.to_s != 'absent' then -%> @@ -226,7 +228,9 @@ ProxyPassReverse / http://127.0.0.1/ <%- if ssl_mode.to_s == 'force' then -%> - Redirect permanent / https://<%= servername %>/ + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L] <%- end -%> <%- if default_charset.to_s != 'absent' then -%> -- cgit v1.2.3