Next.js Discord

Discord Forum

Is there a way to have non-optional segments after [...slug]

Answered
Rex posted this in #help-forum
Open in Discord
Avatar
RexOP
Hi!

I am currently trying to create a category like this

app/skin-care/[...slug]/page/[number]/

but the number 1 page would only be
app/skin-care/[...slug]/

is there a way to achieve this?
Answered by B33fb0n3
no there isn't a way to have non optional segments after [...slug]

You need to build your own path for that or use a route before the slug
View full answer

3 Replies

Avatar
no there isn't a way to have non optional segments after [...slug]

You need to build your own path for that or use a route before the slug
Answer
Avatar
@Rex solved?
Avatar
that's not the answer. I marked the correct one. You don't need to to anything else