summaryrefslogtreecommitdiff
path: root/templates/vhosts/php_silverstripe/partial.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/vhosts/php_silverstripe/partial.erb')
-rw-r--r--templates/vhosts/php_silverstripe/partial.erb9
1 files changed, 5 insertions, 4 deletions
diff --git a/templates/vhosts/php_silverstripe/partial.erb b/templates/vhosts/php_silverstripe/partial.erb
index 89a6052..9ff32db 100644
--- a/templates/vhosts/php_silverstripe/partial.erb
+++ b/templates/vhosts/php_silverstripe/partial.erb
@@ -1,9 +1,10 @@
-<% if vhost_part != :ssl && ![false,'false'].include?(ssl_mode) -%>
# silverstripe
- RedirectMatch /admin(.*) https://<%= servername %>/admin$1
- RedirectMatch /Security(.*) https://<%= servername %>/Security$1
+ RewriteEngine On
+ RewriteCond %{HTTPS} !=on
+ RewriteCond %{HTTP:X-Forwarded-Proto} !=https
+ RewriteRule /admin(.*) https://<%= servername %>/admin$1 [L,R,NE]
+ RewriteRule /Security(.*) https://<%= servername %>/Security$1 [L,R,NE]
-<% end -%>
<Directory "<%= documentroot %>/">
<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>