Reputation: 1612
I found this link: https://focusreactive.com/next-js-redirects/ and I have a project where I am using both app and pages router and using i18n for internalization. I have using both redirects and rewrites and I keep getting 404 or redirected way too many times to get translation to work.
Here is redirect.js
{
source: '/en/:country/:id/',
destination: '/en/:country/id',
locale: false,
permanent: true,
}
Then I have rewrites
{
source: '/en/:country/:id/',
destination: '/profile/:id',
}
I keep getting 404 or redirected way too many times.
In my app folder structure I have both: aap-> en->profile and app->profile. None of them work. What am I missing?
@aralroca
Upvotes: 0
Views: 322