diff options
Diffstat (limited to 'templates/vhosts/redirect')
-rw-r--r-- | templates/vhosts/redirect/redirect.erb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/vhosts/redirect/redirect.erb b/templates/vhosts/redirect/redirect.erb index 0af8bcb..ba93c46 100644 --- a/templates/vhosts/redirect/redirect.erb +++ b/templates/vhosts/redirect/redirect.erb @@ -25,7 +25,9 @@ CustomLog <%= logdir %>/access_log combined <%- 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] <% else -%> Redirect permanent / http://<%= options %> <%- end -%> |