Next JS 14 Routing

113 Views Asked by At

Assume I have a file structure as this (I am using app routing with Next 14), app->[id]->test-[slug]

Assume I didn't set the base path. Now assume I want to set the base path as '/test'. In that case, my folder structure will be, app->[slug]

So as you can see now I can't have url like, localhost:3000/1/test/abc as it will be like, localhost:3000/test/abc.

Is there any way I can test my app by adding the [id] to the url with the base path /test? That means I want url to be like localhost:3000/1/test/abc even after setting the basepath. I went through the documentation but didn't find a way, or maybe it is not possible. Any ideas on this>

0

There are 0 best solutions below