summaryrefslogtreecommitdiff
path: root/templates/vhosts/php_typo3/partial.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/vhosts/php_typo3/partial.erb')
-rw-r--r--templates/vhosts/php_typo3/partial.erb16
1 files changed, 8 insertions, 8 deletions
diff --git a/templates/vhosts/php_typo3/partial.erb b/templates/vhosts/php_typo3/partial.erb
index 5c06570..afb756d 100644
--- a/templates/vhosts/php_typo3/partial.erb
+++ b/templates/vhosts/php_typo3/partial.erb
@@ -1,10 +1,10 @@
<%= scope.function_template(['apache/vhosts/php/partial.erb']) %>
- <Directory "<%= documentroot %>/typo3/">
- RewriteEngine on
+ <Directory "<%= @documentroot %>/typo3/">
+ RewriteEngine on
- # Rewrite URLs to https that go for the admin area
- RewriteCond %{REMOTE_ADDR} !^127\.[0-9]+\.[0-9]+\.[0-9]+$
- RewriteCond %{HTTPS} !=on
- RewriteCond %{REQUEST_URI} (.*/typo3/.*)
- RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R]
- </Directory>
+ # Rewrite URLs to https that go for the admin area
+ RewriteCond %{HTTPS} !=on
+ RewriteCond %{HTTP:X-Forwarded-Proto} !=https
+ RewriteCond %{REQUEST_URI} (.*/typo3/.*)
+ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R,NE]
+ </Directory>