Closed vetalstar closed 3 years ago
Hi, rewrites are not meant to be triggered when returning notFound: true
currently. I'm going to close this as a duplicate of https://github.com/vercel/next.js/issues/26883
@ijjk is there any way to set a custom path to 404 page? As I had showed I have 404 page in the subfolder: _hosts/[host]/404.tsx
Nested 404 pages are not currently available, you can conditionally render on the client based on the props returned from getStaticProps
instead though.
I see. I've done so. Thank you
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
What version of Next.js are you using?
12.0.1
What version of Node.js are you using?
16.13.0
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
npm run dev
Describe the Bug
next.config.js
_hosts/[host]/catalog/[category].tsx
Also I have custom 404 page _hosts/[host]/404.tsx
When I return notFound, fallback rewrites aren't executed. So I can't rewrite pages with dynamic routes to the custom 404 page
Expected Behavior
Fallback rewrites should be executed when dynamic routes are not found
To Reproduce
N/A