<p>I have created an EKS using AWS ALB Ingress Controller and also created a ingress for the same. But after creating the ingress, I am getting <strong>404</strong> while accessing some file extension. Ex: main.css.  Following is my ingress code.</p>
<pre><code>--- 
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata: 
  annotations: 
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/target-type: instance
    kubernetes.io/ingress.class: alb
  name: my-site
  namespace: my-site
spec: 
  rules: 
    - 
      host: my-site.com
      http: 
        paths: 
          - 
            backend: 
              service: 
                name: my-site-front-end-service
                port: 
                  number: 80
            path: /
            pathType: Exact
          - 
            backend: 
              service: 
                name: my-site-backend-service
                port: 
                  number: 3000
            path: /marketing/
            pathType: Prefix


</code></pre>
<p>My frontend application needs to be available on <code>HTTP://my-site.com </code>and the backend service in the URL <code>HTTP://my-site.com/marketing/</code>.But now I am getting 404 for some of the .css files. The URL for the files are like, HTTP://my-site.com/main.css , HTTP://my-site.com//main-5a17625f9c68d9c60c4c.js .  What is wrong with my ingress configuration?</p>
<p>When I update the path type to prefix in the frotend-service section, all the calls will be forwarded to frontend hence the calls to the backend service don't work.</p>

<p>Your ingress endpoint <code>/</code> is of type <code>ExactMatch</code>. Therefore, the files matching <code>/*</code> will <em>not be matched</em>. You can change this to type <code>Prefix</code> and it should work.</p>
<p>Additionally, consider moving your files away from the root of the path to somewhere like <code>/files/</code> and then use <code>/files</code> as a <code>prefix</code> type ingress route. This will make sure the <code>/</code> path remains <code>exactmatch</code> so as not to confuse it with other paths.</p>
