# Redirect all routes not mapped

**URL:** <https://community.traefik.io/t/redirect-all-routes-not-mapped/1961>\
**Category:** Traefik v2\
**Tags:** file\
**Created:** [September 27, 2019, 12:52pm UTC](https://community.traefik.io/t/redirect-all-routes-not-mapped/1961 "2019-09-27T12:52:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![franciscorqj](https://avatars.discourse-cdn.com/v4/letter/f/53a042/32.png) [@franciscorqj](https://community.traefik.io/u/franciscorqj)\
**Post date:** [September 27, 2019, 12:52pm UTC](https://community.traefik.io/t/redirect-all-routes-not-mapped/1961/1 "2019-09-27T12:52:55Z")

</div>

Hello, I'm trying to use a Traefik to be our Api Gateway.

Today I have some services and the routes are the same domain controlled by nginx.

I would like to use the Traefik in front of Nginx and redirect some URLs to one server and the others I will redirect to nginx in another server.

The scheme is something like:

url1 -\> Traefik -\> nginx -\> server1  
url2 -\> Traefik -\> nginx -\> server1  
url3 -\> Traefik -\> nginx -\> server2  
all other urls not mapped -\> Traefik -\> nginx -\> server5

I'm using the TOML, maybe someone can help me?

Thanks

---

<div class="post-metadata">

**Author:** ![zespri](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/zespri/32/310_2.png) [@zespri](https://community.traefik.io/u/zespri)\
**Post date:** [September 28, 2019, 12:56am UTC](https://community.traefik.io/t/redirect-all-routes-not-mapped/1961/2 "2019-09-28T00:56:02Z")

</div>

Hello,

Here is some useful info and pointers:

[https://docs.traefik.io/getting-started/concepts/](https://docs.traefik.io/getting-started/concepts/)  
[https://docs.traefik.io/getting-started/quick-start/](https://docs.traefik.io/getting-started/quick-start/)  
[https://docs.traefik.io/getting-started/configuration-overview/](https://docs.traefik.io/getting-started/configuration-overview/)

Those above are really useful concepts to understand in order to be able to configure it efficienly. Then goes:

[https://docs.traefik.io/providers/overview/](https://docs.traefik.io/providers/overview/)

You are not saying are you using standalone traefik, or is it docker container or what, so read the sections most relevant to you. The file provided section will be useful no matter which orchestration you are using.

[https://docs.traefik.io/routing/routers/](https://docs.traefik.io/routing/routers/)

This one will helpl you with routing, that is `url1 -> Traefik` part

[https://docs.traefik.io/routing/services/](https://docs.traefik.io/routing/services/)

And this one covers `Traefik -> nginx` part.

Please come back and ask if anything does not make sense.
