Need some help figuring out route rewrites #78030
-
SummaryI'm struggling with a regex rewrite and could use some help. The website this is for has a hierarchy of section pages that have URLs like /:dynamic-path/:optional-dynamic-path/:optional-dynamic-path, and they should all render the same way. Examples:
It also has content pages that have urls like /:random-slug/:numeric-id. Examples:
What I'd like to be able to do is have any content page (identified by the numeric id in the URL) to render on a specific page.tsx file (maybe I tried modifying the regex example in the documentation ( Can someone please help me figure out how to route these pages correctly? Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Did you get around trying this? #70303 (comment) '/:slug/:id([0-9]{1,})' |
Beta Was this translation helpful? Give feedback.
I think the issue are the rewrite names, as per your previous discussion, you were rewriting to the same root, test, but if we change that:
With this tree within
app
:T…