Next.js Discord

Discord Forum

keep getting 404 on new created pages

Answered
Black carp posted this in #help-forum
Open in Discord
Original message was deleted.
Answered by Netherland Dwarf
A route is created by creating a folder and having only 1 page.tsx
View full answer

10 Replies

Black carp
Netherland Dwarf
Are you familoar with next 13 routing?
In the app directory
Netherland Dwarf
A route is created by creating a folder and having only 1 page.tsx
Answer
Netherland Dwarf
Example
/app/projects/page.tsx visiting /projects will display the lage
Page*^
Original message was deleted
German yellowjacket
you need to create a new folder inside the app folder with the name of the url you want it to have then add a page.tsx or page.jsx file to that new folder
for example if i want to create a new page for domain.com/stats
i need to create a new folder named "stats" inside my app folder then create a new file called "page.tsx" inside the "stats" folder