Redirect all routes not mapped

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

Hello,

Here is some useful info and pointers:

https://docs.traefik.io/getting-started/concepts/
https://docs.traefik.io/getting-started/quick-start/
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/

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/

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

https://docs.traefik.io/routing/services/

And this one covers Traefik -> nginx part.

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