Next.js Discord

Discord Forum

How to config routes

Unanswered
Ojos Azules posted this in #help-forum
Open in Discord
Ojos AzulesOP
Hi all, I have 2 pages with url format
/agent/${slug}
/agent/${region}-${state}-${postcode}

How can I config the page router to handle it?

1 Reply

Ojos AzulesOP
I have just found the solution for this. We use a custom server to check the URL and redirect.

https://nextjs.org/docs/pages/building-your-application/configuring/custom-server