Redirects in next.config.js - App Router - NextJS 14
Hi guys, I was wondering how can I make a redirect with a nagavite lookahead in the slug.
Let's say I have these two routes:
The problem is that if I include this in the
I tried to use this regex in the slug, but it didn't work...
Any idea of how can I achieve this or if there is a better way of doing it?
Also this is my file tree:
Let's say I have these two routes:
/blog/new/blog/:id/overview
/blog/:id I want to redirect the user to /blog/:id/overview. The problem is that if I include this in the
next.config.js I cannot navigate to /blog/new because new is being inferred as the slug.I tried to use this regex in the slug, but it didn't work...
Any idea of how can I achieve this or if there is a better way of doing it?
Also this is my file tree: