This is one of the weirdest challenges that I had in Next.js. There is why:
It's true that Next.js offers folder-based routing, which makes things easier, but in this case routing was much more complex; this is the guides page of the gaming platform that I have built. You can go to a guide detail page via several ways:
1- Directly via the general guides page.
2- Going to a game's guides and then picking a guide from the list of the game's guides.
3- Going to a game's guides, then a category of those game's guides to pick a guide.
All those directions should show the same final URL. If it was you, how would you manage to get never a 404 error on any navigation?