Skip to content

i18n causes issue with fallback rewrite, resulting in wrong resolvedUrl in pages #83434

@joaogarin

Description

@joaogarin

Link to the code that reproduces this issue

https://codesandbox.io/p/github/joaogarin/next-15-5-2-fallback-url/main

To Reproduce

  1. create a page about/[id].tsx (or [...id] or [[...id]])
  2. In next.config.js setup a rewrite for a catch all route (e.g. /:router*) to go to a specific page
  3. setup some i18n configuration in next.config.js
  4. When visiting /about/2 the resolvedUrlis router and not the actual page url.

This issue first shows up in 15.4.0-canary.45 and seems to have been fixed in 15.5.1-canary.4

Current vs. Expected behavior

Expect the resolvedUrl to be the URL for the actual page being navigated to.

Link to repository : https://github.com/joaogarin/next-15-5-2-fallback-url
Codesandbox: https://codesandbox.io/p/github/joaogarin/next-15-5-2-fallback-url/main
Visit https://hp6dg4-3000.csb.app/about/123

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:28:30 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6030
  Available memory (MB): 36864
  Available CPU cores: 11
Binaries:
  Node: 20.13.1
  npm: 10.5.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 15.5.2 // Latest available version is detected (15.5.2).
  eslint-config-next: N/A
  react: 19.1.1
  react-dom: 19.1.1
  typescript: 5.9.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Pages Router

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

The issue was first introduced in 15.4.0-canary.45, in 15.4.0-canary.44 I dont reproduce the problem and on 15.4.0-canary.45 I can see the problem.

v15.4.0-canary.44...v15.4.0-canary.45

Right now this issue prevents someone from moving past 15.3.x which is a problem since there is a security issue that was ported only to 15.5.2 but this version contains this problem (15.4. introduced the issue in stable versions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pages RouterRelated to Pages Router.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions