From 1ed74a3beb4498ed1566a94c49da3fb4c57cef0e Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 19 Apr 2014 16:49:43 +0200 Subject: combine the checks like this, otherwise we always redirect on security --- templates/vhosts/php_silverstripe/partial.erb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'templates') diff --git a/templates/vhosts/php_silverstripe/partial.erb b/templates/vhosts/php_silverstripe/partial.erb index 8fb87e4..75a8193 100644 --- a/templates/vhosts/php_silverstripe/partial.erb +++ b/templates/vhosts/php_silverstripe/partial.erb @@ -2,16 +2,11 @@ RewriteEngine On RewriteCond %{HTTPS} !=on RewriteCond %{HTTP:X-Forwarded-Proto} !=https - RewriteRule /admin(.*) https://%{HTTP_HOST}/admin$1 [L,R,NE] - RewriteRule /Security(.*) https://%{HTTP_HOST}/Security$1 [L,R,NE] + RewriteRule /(Security|admin)(.*) https://%{HTTP_HOST}/admin$1$2 [L,R,NE] /"> - <%= 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 -- cgit v1.2.3