title: nginx ingress sub path redirection
body: <p>I have an ingress controller and ingress resource running with all /devops mapped to devopsservice in the backend. When I try to hit "<a href="http://hostname/devops" rel="noreferrer">http://hostname/devops</a>" things work and I get a page (although without CSS and styles) with a set of hyperlinks for e.g one of them is "logs".</p>
  
  <p>When I click on the "logs" hyperlink, it is redirecting me to <a href="http://hostname/logs" rel="noreferrer">http://hostname/logs</a> whereas I need it to be <a href="http://hostname/devops/logs" rel="noreferrer">http://hostname/devops/logs</a>.</p>
  
  <p>Any idea what I can do?</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
   name: my-ingress
   namespace: ingress-nginx
   annotations:
     kubernetes.io/ingress.class: nginx
     nginx.ingress.kubernetes.io/rewrite-target: /
     nginx.ingress.kubernetes.io/add-base-url : "true"
  spec:
   rules:
   - host: master1.dev.local
     http:
       paths:
       - backend:
           serviceName: devops1
           servicePort: 10311
         path: /devops
  </code></pre>