# How to setup a catch-all-router?

**URL:** <https://community.traefik.io/t/how-to-setup-a-catch-all-router/6793>\
**Category:** Traefik v2\
**Tags:** file, docker\
**Created:** [July 6, 2020, 9:25pm UTC](https://community.traefik.io/t/how-to-setup-a-catch-all-router/6793 "2020-07-06T21:25:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![cakiwi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cakiwi/32/3205_2.png) [@cakiwi](https://community.traefik.io/u/cakiwi)\
**Post date:** [July 7, 2020, 12:25am UTC](https://community.traefik.io/t/how-to-setup-a-catch-all-router/6793/2 "2020-07-07T00:25:17Z")

</div>

This will really depend on the other router rules that you have.

Read over [routers priority](https://docs.traefik.io/routing/routers/#priority)

You will now know that you can create a `PathPrefix(`/`)` rule with a set priority set to a low value of 1.

All your other routing rules would be processed before this one. Connect this router to a [redirectRegex middleware](https://docs.traefik.io/middlewares/redirectregex/#redirectregex)

---

_[View the full topic](https://community.traefik.io/t/how-to-setup-a-catch-all-router/6793)._
