reactjsnext.js13file-not-found

special (not-found) page dos not work in (route-groups) in next13


I want to create special not-found page in my (next13) project that I have route-groups. and in any route-group I have separate (layout) page. my not-found page is this but dos not work and the default 404 page shows: [image URL] => (https://i.sstatic.net/rzA1O.png)

I try to create (not-found) page aside layout page, my expecting is if I do not have any URL, show this (not-found) page Instead default 404 page


Solution

  • I found out that needs to create (layout) file in (app) folder. and it can just return (children) component. after that we should to create (not-found) page aside this layout. and done!