diff options
Diffstat (limited to 'templates/vhosts/php_drupal/php_drupal.erb')
-rw-r--r-- | templates/vhosts/php_drupal/php_drupal.erb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/templates/vhosts/php_drupal/php_drupal.erb b/templates/vhosts/php_drupal/php_drupal.erb index 56e09ec..dc40e8a 100644 --- a/templates/vhosts/php_drupal/php_drupal.erb +++ b/templates/vhosts/php_drupal/php_drupal.erb @@ -30,7 +30,10 @@ CustomLog <%= logdir %>/access_log combined <%- end -%> <%- if ssl_mode.to_s == 'force' then -%> - Redirect permanent / https://<%= servername %>/ + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L] + <%- end -%> <%- if default_charset.to_s != 'absent' then -%> AddDefaultCharset <%= default_charset %> @@ -276,7 +279,9 @@ ProxyPassReverse / http://127.0.0.1/ <%- if ssl_mode.to_s == 'force' then -%> - Redirect permanent / https://<%= servername %>/ + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L] <%- end -%> |