Skip to content
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

redirect does not work when using multiple root layouts #72352

Open
llipengda opened this issue Nov 5, 2024 · 1 comment
Open

redirect does not work when using multiple root layouts #72352

llipengda opened this issue Nov 5, 2024 · 1 comment
Labels
bug Issue was opened via the bug report template. Navigation Related to Next.js linking (e.g., <Link>) and navigation.

Comments

@llipengda
Copy link

Link to the code that reproduces this issue

https://github.com/llipengda/next-redirect-bug

To Reproduce

  1. next dev
  2. click /test-a
  3. click redirect to /
  4. the page is navigated to /
  5. click /test-b
  6. click redirect to /
  7. this does not work

Current vs. Expected behavior

current: when clicking redirect to / in /test-b, redirect does not work.
expected: redirect to /

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home China
  Available memory (MB): 16164
  Available CPU cores: 16
Binaries:
  Node: 20.18.0
  npm: 10.8.3
  Yarn: 1.22.22
  pnpm: 9.12.2
Relevant Packages:
  next: 15.0.3-canary.6 // Latest available version is detected (15.0.3-canary.6).
  eslint-config-next: N/A
  react: 19.0.0-rc-7c8e5e7a-20241101
  react-dom: 19.0.0-rc-7c8e5e7a-20241101
  typescript: 5.3.3
Next.js Config:
  output: N/A

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

Navigation

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

next dev (local), next start (local)

Additional context

No response

@llipengda llipengda added the bug Issue was opened via the bug report template. label Nov 5, 2024
@github-actions github-actions bot added the Navigation Related to Next.js linking (e.g., <Link>) and navigation. label Nov 5, 2024
@llipengda
Copy link
Author

llipengda commented Nov 7, 2024

Is this a bug, or was it designed to be this way?
I deployed it on Vercel next-redirect-bug-gamma.vercel.app
Can someone help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Navigation Related to Next.js linking (e.g., <Link>) and navigation.
Projects
None yet
Development

No branches or pull requests

1 participant