# Twee domeinen, voorwaardelijke doorsturing

**URL:** <https://meta.discourse.org/t/two-domains-conditional-redirect/168597>\
**Category:** Product Support\
**Created:** [28 oktober 2020 om 23:52 UTC](https://meta.discourse.org/t/two-domains-conditional-redirect/168597 "2020-10-28T23:52:35Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![tyler.clark](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tyler.clark/32/120645_2.png) [@tyler.clark](https://meta.discourse.org/u/tyler.clark)\
**Post date:** [29 oktober 2020 om 12:58 UTC](https://meta.discourse.org/t/two-domains-conditional-redirect/168597/6 "2020-10-29T12:58:49Z")

</div>

We got it working by adding the following to the `web.ssl.template.yml` file:

```plaintext
if ($host = domain2.com) {
    rewrite ^/$ /c/example/18 permanent;
}

```

---

_[View the full topic](https://meta.discourse.org/t/two-domains-conditional-redirect/168597)._
