redirect_hosts.html.twig in Fastly 8.3
{% for rule in rules %}
if (req.http.host == "{{ rule.source }}") {
set req.http.host = "{{ rule.destination }}";
{% if rule.ignore_path %}
set req.url = "/";
{% endif %}
error 801;
}
{% endfor %}
File
fastly_edge_modules/templates/redirect_hosts.html.twig
View source
- {% for rule in rules %}
- if (req.http.host == "{{ rule.source }}") {
- set req.http.host = "{{ rule.destination }}";
- {% if rule.ignore_path %}
- set req.url = "/";
- {% endif %}
- error 801;
- }
- {% endfor %}