static assets routes returns the home page contents instead of 404 #1644
Unanswered
damnitrahul
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a large NextJS + PayloadCMS website which uses
[email protected]
.When I try to access asset routes from the public directory like
/favicon.ico
or/this-file-exists.js
it returns the file correctly.But, when I try to access an asset like
/xyz.js
which isn't available on the server the app returns the home page/[locale]/page.tsx
where the value ofprops.params.locale
is set asxyz.js
Instead, it should ideally return a 404
/[locale]/not-found.tsx
page.This is what my matcher looks like currently
What's wrong with my setup? It would be great if someone could point me in the right direction 🙏🏼
Beta Was this translation helpful? Give feedback.
All reactions