support the case for smartgears_special_redirect
This commit is contained in:
parent
6dd638ffee
commit
73fdaee1d9
|
@ -165,13 +165,19 @@ server {
|
|||
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/$uri;
|
||||
}
|
||||
{% endif %}
|
||||
{% if smartgears_special_redirect is defined %}
|
||||
{% for target in smartgears_special_redirect %}
|
||||
location {{ target.source_uri }} {
|
||||
return 301 http://{{ target.dest_host }}/{{ target.dest_url }};
|
||||
}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
location / {
|
||||
return 301 https://{{ item.servername }}$request_uri;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
}
|
||||
|
||||
{% if letsencrypt_acme_install %}
|
||||
|
@ -343,6 +349,12 @@ server {
|
|||
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/$uri;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if smartgears_special_redirect is defined %}
|
||||
{% for target in smartgears_special_redirect %}
|
||||
location {{ target.source_uri }} {
|
||||
return 301 http://{{ target.dest_host }}/{{ target.dest_url }};
|
||||
}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue