<p>I've configured an Ingress with config:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nuclio-dashboard
  namespace: nuclio
spec:
  rules:
    - host: nuc.local
      http:
        paths:
          - path: /nuclio
            backend:
              serviceName: nuclio-dashboard
              servicePort: 8070
</code></pre>
<p>Not when I go to <code>nuc.local/nuclio</code> I'm getting a response but the page requests js and css files at:</p>
<pre><code>http://nuc.local/assets/css/vendor-fc43143698.css Failed to load resource: the server responded with a status of 404 (Not Found)
</code></pre>
<p>I want every request mage from <code>/nuclio</code> to <code>/</code> to go to <code>/nuclio</code>.</p>
<p>How can I accomplish this?</p>

Dirk
<p>Assuming you're using Traefik v2, you need something like a <a href="https://doc.traefik.io/traefik/middlewares/redirectregex/" rel="nofollow noreferrer">redirectRegex Middleware</a>, for traefik to do this. I think it would go like this.</p>
<pre><code>---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: test-redirectregex
  namespace: nuclio
spec:
  redirectRegex:
    regex: ^http://nuc.local/?$$
    replacement: http://nuc.local/nuclio/
    permanent: true
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    traefik.ingress.kubernetes.io/router.middlewares: nuclio-test-redirectregex@kubernetescrd
  name: nuclio-dashboard
  namespace: nuclio
spec:
  rules:
    - host: nuc.local
      http:
        paths:
          - path: /
            backend:
              serviceName: nuclio-dashboard
              servicePort: 8070
</code></pre>
<p>Another take on it could be to use the <a href="https://doc.traefik.io/traefik/middlewares/replacepath/" rel="nofollow noreferrer">replacePath Middleware</a>, which would then look like this:</p>
<pre><code>---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: test-replacepath
  namespace: nuclio
spec:
  replacePath:
    path: /nclio
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    traefik.ingress.kubernetes.io/router.middlewares: nuclio-test-replacepath@kubernetescrd
  name: nuclio-dashboard
  namespace: nuclio
spec:
  rules:
    - host: nuc.local
      http:
        paths:
          - path: /
            backend:
              serviceName: nuclio-dashboard
              servicePort: 8070
</code></pre>
<p>Let us know how that goes.</p>
