summaryrefslogtreecommitdiff
path: root/templates/vhosts/php_silverstripe/partial.erb
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2015-04-17 15:32:01 -0400
committerMicah Anderson <micah@riseup.net>2015-04-17 15:32:01 -0400
commit36fd84c3d17355afa05b519764c37a3e45efc40d (patch)
treec6f5dbc4651875a147607c788b37c5c973573330 /templates/vhosts/php_silverstripe/partial.erb
parentffa03fb9f13bcd78b7e22f47b224c5a7244328ef (diff)
parent8074127b8d8913314c90c3fe6131d078a858f7b6 (diff)
Merge remote-tracking branch 'immerda/master'
Diffstat (limited to 'templates/vhosts/php_silverstripe/partial.erb')
-rw-r--r--templates/vhosts/php_silverstripe/partial.erb20
1 files changed, 8 insertions, 12 deletions
diff --git a/templates/vhosts/php_silverstripe/partial.erb b/templates/vhosts/php_silverstripe/partial.erb
index 89a6052..75a8193 100644
--- a/templates/vhosts/php_silverstripe/partial.erb
+++ b/templates/vhosts/php_silverstripe/partial.erb
@@ -1,16 +1,12 @@
-<% if vhost_part != :ssl && ![false,'false'].include?(ssl_mode) -%>
- # silverstripe
- RedirectMatch /admin(.*) https://<%= servername %>/admin$1
- RedirectMatch /Security(.*) https://<%= servername %>/Security$1
-
-<% end -%>
- <Directory "<%= documentroot %>/">
+ # silverstripe
+ RewriteEngine On
+ RewriteCond %{HTTPS} !=on
+ RewriteCond %{HTTP:X-Forwarded-Proto} !=https
+ RewriteRule /(Security|admin)(.*) https://%{HTTP_HOST}/admin$1$2 [L,R,NE]
+ <Directory "<%= @documentroot %>/">
<%= scope.function_template(['apache/vhosts/partials/std_override_options.erb']) %>
-
<%= scope.function_template(['apache/vhosts/partials/php_settings.erb']) %>
-
<%= scope.function_template(['apache/vhosts/partials/authentication.erb']) %>
-
- Include include.d/silverstripe.inc
- </Directory>
+ Include include.d/silverstripe.inc
+ </Directory>