# Domain.com launch to domain.com/path1/path2

**URL:** <https://community.traefik.io/t/domain-com-launch-to-domain-com-path1-path2/22392>\
**Category:** Traefik v2\
**Tags:** file, middleware\
**Created:** [April 21, 2024, 10:41am UTC](https://community.traefik.io/t/domain-com-launch-to-domain-com-path1-path2/22392 "2024-04-21T10:41:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![clintonmarshall](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/clintonmarshall/32/8590_2.png) [@clintonmarshall](https://community.traefik.io/u/clintonmarshall)\
**Post date:** [April 21, 2024, 10:41am UTC](https://community.traefik.io/t/domain-com-launch-to-domain-com-path1-path2/22392/1 "2024-04-21T10:41:55Z")

</div>

_First time to community_ Thank you

I am trying to figure out what method to use to have the base url go to a path that is two deep but not affect other functions /paths of the domain

Found [301 redirect to “main” domain](https://community.traefik.io/t/301-redirect-to-main-domain/16547) but this is for docker using lables.

I'm using file provider to go to a non-docker host

I used to use this in nginx proxy manager and under the advance tab of a host used this

`location = /{return 301 $scheme://$http_host/path1/path2/;}`

I have got one path to work using

```auto
middlewares:
   path1:
      addPrefix:
        prefix: "/path1"

```

```auto
middlewares:
   path1path2:
      addPrefix:
        prefix: "/path1/path2"

```

but this seems to affect other parts of the site and not working as intended.

What would be the best approach?

Thanks

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [April 21, 2024, 1:35pm UTC](https://community.traefik.io/t/domain-com-launch-to-domain-com-path1-path2/22392/2 "2024-04-21T13:35:52Z")

</div>

Share your full Traefik static and dynamic config, and `docker-compose.yml` if used.

Note that placing a web app under a path (or removing a path) usually just works for APIs with single requests, not for GUI web apps with links, scripts and images.
