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

> Learn how to configure your Traefik reverse proxy to strip route prefixes when using Docker Compose. This TIL provides step-by-step instructions for using…

- URL: https://graffino.com/til/how-to-strip-route-prefixes-in-traefik-using-docker-compose-in-order-to-serve-laravel-under-a-specific-route
- Author: Nick Ciolpan
- Channel: sysops
- Published: 2023-02-21
- Updated: 2026-06-04

```
- 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
```
