How to Strip Route Prefixes in Traefik Using Docker Compose In Order To Serve Laravel Under A Specific Route

```
- traefik.http.routers.${COMPOSE_PROJECT_NAME}-api.rule=Host(`${TRAEFIK_HOSTNAME}`) && PathPrefix(`/my-route`)
- traefik.http.middlewares.strip-${COMPOSE_PROJECT_NAME}-api.stripprefix.prefixes=/my-route
- traefik.http.routers.${COMPOSE_PROJECT_NAME}-api.middlewares=strip-${COMPOSE_PROJECT_NAME}-api
```

Nick Ciolpan
21 Feb 2023
« Back to post