Dynamic route static prefixes: category-[categoryId]
#84177
Unanswered
dmythro
asked this question in
App Router
Replies: 1 comment 5 replies
-
For this case you can use rewrites tough, but that may have some minor caveats. Let me find a similar thread someone opened not long ago. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
On one of the projects, SEO requires less "levels" of url pathname so instead of
category/[categoryId]
they requirecategory-[categoryId]
,item-[itemId]
etc for some entities.Tried with Next.js 15.5 and it doesn't work like that.
Handling all of that in a single
[slug]
route is super problematic: multiple entities handled in the route + it introduces a generic dynamic handler which causes many other issues, especially in the root of app routes!Beta Was this translation helpful? Give feedback.
All reactions