<p>I have an helm chart serving an Mediawiki using apache. Internally it does so from /wiki.</p>

<p>I'd like to run multiply instances and externally reach it from /something-wiki, /other-wiki and so on.</p>

<p>So in other words I'd like to have my ingress controller react to one path and internally go to another path.</p>

<p>I tried the below but it just sends a 301 (moved permanently) which doesn't work since the folder doesn't exists.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /wiki
  name: wiki-environment-erst-env
  namespace: wiki
spec:
  rules:
  - host: aks-dev.something.com
    http:
      paths:
      - backend:
          serviceName: erst-wiki-package
          servicePort: 80
        path: /erst-wiki
  tls:
  - hosts:
    - aks-dev.something.com
    secretName: erst-tls-secret
</code></pre>

<p>Any ideas?</p>

user672009
<p>If I understand correctly, regexp redirection might work. And the wiki configuration should be handled accordingly.</p>

<p><code>
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/use-regex: true
  name: wiki-environment-erst-env
  namespace: wiki
spec:
  rules:
  - host: aks-dev.something.com
    http:
      paths:
      - backend:
          serviceName: erst-wiki-package
          servicePort: 80
        path: /erst-wiki/.*
  tls:
  - hosts:
    - aks-dev.something.com
    secretName: erst-tls-secret</code></p>
