# Route Path & Service listening routes

**URL:** <https://community.traefik.io/t/route-path-service-listening-routes/3397>\
**Category:** Traefik v2\
**Tags:** middleware, docker\
**Created:** [December 11, 2019, 5:07am UTC](https://community.traefik.io/t/route-path-service-listening-routes/3397 "2019-12-11T05:07:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yasha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/yasha/32/1263_2.png) [@yasha](https://community.traefik.io/u/yasha)\
**Post date:** [December 11, 2019, 5:07am UTC](https://community.traefik.io/t/route-path-service-listening-routes/3397/1 "2019-12-11T05:07:03Z")

</div>

hi,

Given a simple service running in a docker container which return `foo` for a get request at /  
I want this service to be accessed from `https://api.foo.com/bar`

This actually reach the service:  
`- traefik.http.routers.fooservice.rule=Host(`api.foo.com`) && PathPrefix(`/bar`)"`

But then I get an error message saying the service does not have a route for /bar  
Basically the request actually reach the service, but not as root / but as /bar

I have tried to use  
` "traefik.http.middlewares.fooservice-stripprefix.stripprefix.prefixes=/bar"`

but didnt seem to do much.  
Did I miss something?

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![ldez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/ldez/32/5_2.png) [@ldez](https://community.traefik.io/u/ldez)\
**Post date:** [December 11, 2019, 10:09am UTC](https://community.traefik.io/t/route-path-service-listening-routes/3397/2 "2019-12-11T10:09:51Z")

</div>

Hello,

Could provide a reproducible example? (small docker-compose file)

---

<div class="post-metadata">

**Author:** ![yasha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/yasha/32/1263_2.png) [@yasha](https://community.traefik.io/u/yasha)\
**Post date:** [December 12, 2019, 3:15am UTC](https://community.traefik.io/t/route-path-service-listening-routes/3397/3 "2019-12-12T03:15:27Z")

</div>

ok I fixed the problem.  
I misunderstood how chaining middleware worked and https middleware was the only one used - and `stripprefix.prefixes=/bar` was not used.
