diff options
Diffstat (limited to 'templates/vhosts/php_silverstripe/partial.erb')
-rw-r--r-- | templates/vhosts/php_silverstripe/partial.erb | 20 |
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> |