summaryrefslogtreecommitdiff
path: root/templates/vhosts/php_simplemachine/php_simplemachine.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/vhosts/php_simplemachine/php_simplemachine.erb')
-rw-r--r--templates/vhosts/php_simplemachine/php_simplemachine.erb8
1 files changed, 6 insertions, 2 deletions
diff --git a/templates/vhosts/php_simplemachine/php_simplemachine.erb b/templates/vhosts/php_simplemachine/php_simplemachine.erb
index d9d1f25..37ac794 100644
--- a/templates/vhosts/php_simplemachine/php_simplemachine.erb
+++ b/templates/vhosts/php_simplemachine/php_simplemachine.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 -%>
@@ -222,7 +224,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 -%>