diff --git a/templates/haproxy_cfg b/templates/haproxy_cfg index 9d3f4687c4df5875163f10c44d0cb8e7974aae56..94907756a950fb44236965ec91e21a0fb30aae68 100644 --- a/templates/haproxy_cfg +++ b/templates/haproxy_cfg @@ -67,7 +67,9 @@ frontend http_in {% for domain in drupal.domains|default([]) %} {% if not domain.multidomain|default(false) %} {% for alias in domain.aliases|default([]) %} +{% if domain.aliases_without_redirect is not defined or alias not in domain.aliases_without_redirect %} redirect prefix {{ domain.protocol|default('https') }}://{{domain.domain}} code 301 if { hdr(host) -i -n {{alias}} } +{% endif %} {% endfor %} {% endif %} {% endfor %} @@ -111,7 +113,9 @@ frontend https_in_{{ cert.ip }} {% for domain in drupal.domains|default([]) %} {% if not domain.multidomain|default(false) %} {% for alias in domain.aliases|default([]) %} +{% if domain.aliases_without_redirect is not defined or alias not in domain.aliases_without_redirect %} redirect prefix {{ domain.protocol|default('https') }}://{{domain.domain}} code 301 if { hdr(host) -i -n {{alias}} } +{% endif %} {% endfor %} {% endif %} {% endfor %}