From 9737a3e02d4fe5ddfea6983270acfc3d85738f97 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Fri, 6 May 2016 10:11:47 +0200
Subject: [PATCH] General improvements

---
 templates/haproxy_cfg | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/templates/haproxy_cfg b/templates/haproxy_cfg
index 2f81a7a..e905809 100644
--- a/templates/haproxy_cfg
+++ b/templates/haproxy_cfg
@@ -61,9 +61,11 @@ frontend http_in
 {% if proxy_redirect_aliase %}
 {% for drupal in hostvars[host].drupal_settings|default([]) %}
 {% for domain in drupal.domains|default([]) %}
+{% if not domain.multidomain|default(false) %}
 {% for alias in domain.aliases|default([]) %}
   redirect prefix {{ domain.protocol|default('https') }}://{{domain.domain}} code 301 if { hdr(host) -i -n {{alias}} }
 {% endfor %}
+{% endif %}
 {% endfor %}
 {% endfor %}
 {% endif %}
@@ -99,9 +101,11 @@ frontend https_in_{{ cert.ip }}
 {% if proxy_redirect_aliase %}
 {% for drupal in hostvars[host].drupal_settings|default([]) %}
 {% for domain in drupal.domains|default([]) %}
+{% if not domain.multidomain|default(false) %}
 {% for alias in domain.aliases|default([]) %}
   redirect prefix {{ domain.protocol|default('https') }}://{{domain.domain}} code 301 if { hdr(host) -i -n {{alias}} }
 {% endfor %}
+{% endif %}
 {% endfor %}
 {% endfor %}
 {% endif %}
-- 
GitLab