Designing Complex Next.js Guide Routes Without 404 ErrorsDesigning Complex Next.js Guide Routes Without 404 Errors
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
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?
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started