Skip to content
Snippets Groups Projects
Commit 92b3865d authored by jurgenhaas's avatar jurgenhaas
Browse files

Improve redirect vhosts

parent dd583bf4
No related branches found
No related tags found
No related merge requests found
......@@ -135,8 +135,12 @@
ServerName dummy.{{ drupal_domain.domain }}
ServerAlias {% for redirect in drupal_domain.redirects|default([]) %} {{ redirect }}{% endfor %}{% if drupal_domain.aliases_redirect|default(False) %}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}{% endif %}
{% for line in drupal_domain.aliases_redirect_extras|default([]) %}
{{ line }}
{% endfor %}
RewriteEngine on
RewriteRule ^ {{ drupal_domain.protocol|default("https") }}://{{ drupal_domain.domain }}%{REQUEST_URI} [END,QSA,R=permanent]
RewriteRule {{ drupal_domain.aliases_redirect_pattern|default('^') }} {{ drupal_domain.protocol|default("https") }}://{{ drupal_domain.domain }}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>
{% if drupal_domain.protocol|default("https") == "https" and groups.proxyserver is not defined %}
......@@ -149,8 +153,12 @@
Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
{% for line in drupal_domain.aliases_redirect_extras|default([]) %}
{{ line }}
{% endfor %}
RewriteEngine on
RewriteRule ^ https://{{ drupal_domain.domain }}%{REQUEST_URI} [END,QSA,R=permanent]
RewriteRule {{ drupal_domain.aliases_redirect_pattern|default('^') }} https://{{ drupal_domain.domain }}%{REQUEST_URI} [END,QSA,R=permanent]
{% if drupal_domain.protocol|default("https") == "https" and groups.proxyserver is not defined %}
Include /etc/apache2/{{ apache_conf_dir }}/options-ssl-apache.conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment