-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Deprecate and remove pcm and fil locales #16804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
0f4adc2 to
0a6b18e
Compare
0a6b18e to
79e067e
Compare
| { source: "/no/:path*", destination: "/nb/:path*", permanent: true }, | ||
| { source: "/ph/:path*", destination: "/fil/:path*", permanent: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@corwintines @wackerow these redirects for deprecated locales (/pcm, /fil, /ph) and the Norwegian alias (/no → /nb) were working fine locally but not on Netlify.
The reson is that, on Netlify Edge, the next-intl middleware runs before Next.js processes the redirects in next.config.js. So when someone hit /pcm/some-page, the middleware intercepted it first, didn't recognize pcm as a valid locale, and returned a 404 instead of redirecting to the English version.
By handling these locale redirects directly in the middleware (before next-intl does its thing), we ensure they work consistently everywhere — local dev, Netlify preview deploys, and prod.
wackerow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! Working well in Netlify preview... ph fil and pcm being stripped out appropriately, and any further redirects for paths are being applied. /no going to /nb along with any other applicable redirects. 👍

Description
Removes support for
pcm(Nigerian Pidgin) andfil(Filipino) locales and adds temporary 307 redirects to the default locale.