title: Redirecting a path to the same container but different port with Traefik
body: <p>I have the following setup with docker compose (running swarm mode):</p>
  
  <pre><code>mydomain.com --&gt; ContainerA:8080
  </code></pre>
  
  <p>But what I would like is through labels, specify the following for the same container:</p>
  
  <pre><code>mydomain.com/test --&gt; ContainerA:80
  mydomain.com --&gt; ContainerA:8080
  </code></pre>
  
  <p>So far I have the following Labels in compose:</p>
  
  <pre><code>deploy:
    labels:
      - traefik.port=8080
      - traefik.docker.network=apps
      - traefik.protocol=http
      - traefik.frontend.rule=Host:mydomain.com
  </code></pre>
  
  <p>Thanks in advance</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Now I have tried with this, following your advice.Here is what I have set up, but still doesn't work, I get a 404 error:</p>
  
  <p><code>- traefik.docker.network=apps
   - traefik.main.protocol=http
   - traefik.main.port=8069
   - traefik.main.frontend.rule=Host:odoo.mydomain.com
   - traefik.worker.port=8072
   - traefik.worker.protocol=http
   - traefik.worker.frontend.rule=Host:odoo.mydomain.com;PathPrefixStrip:/longpolling</code></p>