# Using middlewares on specific pages

**URL:** <https://community.traefik.io/t/using-middlewares-on-specific-pages/6655>\
**Category:** Traefik v2\
**Tags:** docker-swarm, middleware, docker\
**Created:** [June 25, 2020, 8:25am UTC](https://community.traefik.io/t/using-middlewares-on-specific-pages/6655 "2020-06-25T08:25:29Z")\
**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:** [June 25, 2020, 12:49pm UTC](https://community.traefik.io/t/using-middlewares-on-specific-pages/6655/2 "2020-06-25T12:49:43Z")

</div>

Welcome @xhitman

See this answer, basically the same thin.

> **[Exclude particular path(s) from basicauth](https://community.traefik.io/t/exclude-particular-path-s-from-basicauth/6643/2)**
>
> You would have to add another router on the service. - "traefik.http.routers.first.rule=Host(\`my.site\`)" - "traefik.http.routers.first.middlewares=prod-auth" -...

---

_[View the full topic](https://community.traefik.io/t/using-middlewares-on-specific-pages/6655)._
