This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Rewrites are in conflict with i18n #68706
Labels
bug
Issue was opened via the bug report template.
Internationalization (i18n)
Related to Internationalization with Next.js.
Linking and Navigating
Related to Next.js linking (e.g., <Link>) and navigation.
Pages Router
Related to Pages Router.
Link to the code that reproduces this issue
https://github.com/yunsii/reproduciton-nextjs-rewrites-i18n
To Reproduce
Without i18n config, the rewrites config works very well. But with i18n config, the homepage localhost:3000 goes to 404, I have to add extra rewrite rule:
to make the homepage work as expected.
Current vs. Expected behavior
I18n config should not affect rewrites config, isn't it?
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Thu Oct 5 21:02:42 UTC 2023 Available memory (MB): 40115 Available CPU cores: 16 Binaries: Node: 20.12.2 npm: 10.5.0 Yarn: 1.22.15 pnpm: 6.11.0 Relevant Packages: next: 14.2.5 // Latest available version is detected (14.2.5). eslint-config-next: 14.2.5 react: 18.3.1 react-dom: 18.3.1 typescript: 5.5.4 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Internationalization (i18n), Navigation, Pages Router
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: