summaryrefslogtreecommitdiff
path: root/templates/vhosts/gitweb
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/gitweb
parent8d9291378001e8b0471895b084387261b730cdac (diff)
improve redirect, so we don't stick on the servername
Diffstat (limited to 'templates/vhosts/gitweb')
-rw-r--r--templates/vhosts/gitweb/gitweb.erb5
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/vhosts/gitweb/gitweb.erb b/templates/vhosts/gitweb/gitweb.erb
index 908177b..4beda07 100644
--- a/templates/vhosts/gitweb/gitweb.erb
+++ b/templates/vhosts/gitweb/gitweb.erb
@@ -29,7 +29,10 @@
AddDefaultCharset <%= default_charset %>
<%- 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 -%>
SetEnv GITWEB_CONFIG <%= gitweb_config %>