Next.js Discord

Discord Forum

Dynamic Routing based on regexp matching

Unanswered
Bigeye tuna posted this in #help-forum
Open in Discord
Bigeye tunaOP
I have a project in next js 13.5 where I want to handle a scenario

I have three set of routes

/flights/mumbai-new_delhi-airindia_express-ix-flights

/flights/flights-to-mumbai

/flights/flights-to-mumbai

All these routes are dynamic routes by which I mean there is some variables that are changing. I want to handle all these routes at different controller level. If this was is node js then I'd used regexp matching to achieve this in different controllers. How can I handle the same scenario in Next Js 13.5

0 Replies