You are here

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
  1. {% for rule in rules %}
  2. if (req.http.host == "{{ rule.source }}") {
  3. set req.http.host = "{{ rule.destination }}";
  4. {% if rule.ignore_path %}
  5. set req.url = "/";
  6. {% endif %}
  7. error 801;
  8. }
  9. {% endfor %}