Next.js Discord

Discord Forum

404 for child dynamic route

Unanswered
Sabine's Gull posted this in #help-forum
Open in Discord
Sabine's GullOP
Im a typescript developer and on my project I have a dynamic route called [id], which has a child folder/route called blog.

The route looks like this: localhost:3000/example-route/[id]/blog

My blog folder does have a page.tsx file, as does my [id] folder, plus a layout.tsx in my [id] folder.

I can access my localhost:3000/example-route/[id] route, but when I want to go to blog, I get a 404 not found error.

Do you have any ideas for this?

Structure :
- example-route
- [id]
- blog
- page.tsx
- layout.tsx
- page.tsx

The error : GET http://localhost:3000/example-route/[id]/blog 404 (Not Found)

2 Replies

Asian black bear
Ensure that the folder has the correct capitalization since difference operating systems behave differently. My recommendation is to not rely on capitalization and keep everything lowercase.
Sabine's GullOP
If you talk about my principal route “exampleRoute”, this is just an example, my route is in lowercase.