# Dynamically set Redirect To?

**URL:** <https://community.auth0.com/t/dynamically-set-redirect-to/7751>\
**Category:** Get Help\
**Tags:** redirect-to\
**Created:** [August 4, 2017, 10:30pm UTC](https://community.auth0.com/t/dynamically-set-redirect-to/7751 "2017-08-04T22:30:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![michelle.wrighton](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@michelle.wrighton](https://community.auth0.com/u/michelle.wrighton)\
**Post date:** [August 4, 2017, 10:30pm UTC](https://community.auth0.com/t/dynamically-set-redirect-to/7751/1 "2017-08-04T22:30:44Z")

</div>

I’m trying to dynamically set the redirect-to link depending on the environment being used. I built a case statement:

```
{% case connection.name %}
{% when 'yahoo' %}
http://www.yahoo.com
{% when 'firefox' %}
http://www.mozilla.org/firefox
{% else %}
http://www.google.com
{% endcase %}

```

…but it can’t seem to read the connection.name; it will always redirect to [google.com](http://google.com) in the above scenario. Hard-coding it to ‘yahoo’ will also dump the user into google.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [August 7, 2017, 8:29pm UTC](https://community.auth0.com/t/dynamically-set-redirect-to/7751/2 "2017-08-07T20:29:15Z")

</div>

As far as I’m aware `connection.name` is not available at the _Redirect To_ field; only application-level fields like `callback_domain` and `clientID`. If you check the documentation you’ll also see that `connection.name` is show in association with the _Subject_ field.

You mention that you’re trying to do the redirect based on the environment; if this is a case of separating development/test users from production users by using different connections then have in mind that our [recommendation would be to have separate accounts](https://auth0.com/docs/dev-lifecycle/setting-up-env) for development and QA environments.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/dynamically-set-redirect-to/7751/3 "2018-03-02T05:55:46Z")

</div>


