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

Redirect prefix only if no wildcard domain

parent 33500377
No related branches found
No related tags found
No related merge requests found
......@@ -88,8 +88,8 @@ frontend http_in
{% endif %}
{% endif %}
{% endfor %}
{% if from != redirect.to or redirect.protocol|default('https') == 'https' %}
redirect prefix {{ redirect.protocol|default('https') }}://{{redirect.to}} code 301 if { {{ (from == ".") | ternary('hdr_sub', 'hdr') }}(host) -i -n {{ from }} }
{% if (from != redirect.to or redirect.protocol|default('https') == 'https') and from != "." %}
redirect prefix {{ redirect.protocol|default('https') }}://{{redirect.to}} code 301 if { hdr(host) -i -n {{ from }} }
{% endif %}
{% endfor %}
{% endfor %}
......@@ -198,8 +198,8 @@ frontend https_in_{{ cert.ip }}
{% endif %}
{% endif %}
{% endfor %}
{% if from != redirect.to or redirect.protocol|default('https') != 'https' %}
redirect prefix {{ redirect.protocol|default('https') }}://{{redirect.to}} code 301 if { {{ (from == ".") | ternary('hdr_sub', 'hdr') }}(host) -i -n {{ from }} }
{% if (from != redirect.to or redirect.protocol|default('https') != 'https') and from != "." %}
redirect prefix {{ redirect.protocol|default('https') }}://{{redirect.to}} code 301 if { hdr(host) -i -n {{ from }} }
{% endif %}
{% endfor %}
{% endfor %}
......
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