title: Traefik path based routing in kubernetes ingress not working as expected
body: <p>I am trying to use the path based routing mechanism provided by Traefik ingress controller in Kubernetes but I have some issues with the url rewriting.</p>
  
  <p>My [UPDATED] configuration is as follow </p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    annotations:
      kubernetes.io/ingress.class: traefik
      traefik.ingress.kubernetes.io/auth-type: "basic"
      traefik.ingress.kubernetes.io/auth-tls-insecure: "true"
      traefik.ingress.kubernetes.io/frontend-entry-points: "http,https"
      traefik.ingress.kubernetes.io/app-root: "/"
      traefik.ingress.kubernetes.io/rule-type: "PathPrefixStrip"
      traefik.ingress.kubernetes.io/rewrite-target: "/"
    name: webapp-ingress
    namespace: my-company
  spec:
    rules:
     - host: local-ubuntu
     - http:
        paths:
        - path: /
          backend:
            serviceName: webapp
            servicePort: 80
        - path: /db
          backend:
            serviceName: db-manager
            servicePort: 8081
  </code></pre>
  
  <p>The traffic is routed to the right services but the url is still prefixed with /db when I look at the log for the db-manager (kubernetes) service.
  What I would have expected with the PathPrefixStrip is that the traffic will be routed without the /db prefix to the container running the db-manager micro-service which is listening on / (<a href="http://db-manager:8081" rel="noreferrer">http://db-manager:8081</a>) on the backend side.</p>
  
  <p>Am I missing something ? Is it supported by traefik or only nginx ?
  Thank you by advance for your feedback.</p>
  
  <p>[EDIT]</p>
  
  <p>To be more specific I observe the following with the current annotations discussed below</p>
  
  <ul>
  <li>traefik.ingress.kubernetes.io/rule-type: "PathPrefixStrip"</li>
  <li>traefik.ingress.kubernetes.io/rewrite-target: "/"</li>
  </ul>
  
  <p>URL: <a href="http://local-ubuntu/db" rel="noreferrer">http://local-ubuntu/db</a> [OK] -> 200</p>
  
  <p>Then other resources are loading but are pointing on the wrong base url</p>
  
  <p>Example: </p>
  
  <p>Resource URL is : <a href="http://local-ubuntu/public/css/bootstrap.min.css" rel="noreferrer">http://local-ubuntu/public/css/bootstrap.min.css</a></p>
  
  <p>But this should be : <a href="http://local-ubuntu/db/public/css/bootstrap.min.css" rel="noreferrer">http://local-ubuntu/db/public/css/bootstrap.min.css</a>
  (which works when I've tried manually)</p>
  
  <p>I am not sure what I am missing here in the current configuration.</p>