summaryrefslogtreecommitdiff
path: root/templates/vhosts/perl
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-10-25 22:58:24 +0200
committermh <mh@immerda.ch>2010-10-25 22:58:24 +0200
commita4358a825de159a145b877c7b7d7c795c72cb3b4 (patch)
tree3f9f0638c5834a3883c0b264995fb4bb8cba47e8 /templates/vhosts/perl
parent8d9291378001e8b0471895b084387261b730cdac (diff)
improve redirect, so we don't stick on the servername
Diffstat (limited to 'templates/vhosts/perl')
-rw-r--r--templates/vhosts/perl/perl.erb8
1 files changed, 6 insertions, 2 deletions
diff --git a/templates/vhosts/perl/perl.erb b/templates/vhosts/perl/perl.erb
index 056730a..b922637 100644
--- a/templates/vhosts/perl/perl.erb
+++ b/templates/vhosts/perl/perl.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 -%>
@@ -229,7 +231,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 -%>