Next.js Discord

Discord Forum

Catch-all must be the last part of the URL.

Unanswered
Red-throated Loon posted this in #help-forum
Open in Discord
Red-throated LoonOP
I would like to make dynamic routes like:
/app
  /app/[[...path]]
    /app/[[...path]]/edit
      /app/[[..path]]/edit/page.tsx
    /app/[[...path]]/add
      /app/[[..path]]/add/page.tsx
    /app/[[...path]]/page.tsx

But I get this error Error: Catch-all must be the last part of the URL. which is pretty clear, but is there any way to achieve dynamic routes like described above?

4 Replies

Red-throated LoonOP
Ah, I see, sounds good, thanks