How to apply redirects (through next.config.mjs) for dynamic routes
Unanswered
Asiatic Lion posted this in #help-forum
Asiatic LionOP
I tried adding the below. It works fine when I hit a route like
I'm in an App Dir
Has anyone tried redirects on the dynamic routes in the new app dir?
/launchpad/team1/skills, but I also see the redirect happening (sometimes?) on launchpad/team1 route as well. async redirects() {
return [
{
source: "/launchpad/:team/skills",
destination: "/launchpad/:team/skills/summary",
permanent: true,
},
];
}I'm in an App Dir
app/launchpad (although I have some legacy pages/* files too).Has anyone tried redirects on the dynamic routes in the new app dir?