redirect
not honoring basePath
#53713
Labels
bug
Issue was opened via the bug report template.
Linking and Navigating
Related to Next.js linking (e.g., <Link>) and navigation.
locked
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023 Binaries: Node: 16.17.0 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.1.0 Relevant Packages: next: 13.4.14-canary.0 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/gifted-forest-8kjr9w?file=%2Fnext.config.js%3A9%2C1
To Reproduce
basePath
tonext.config.js
(e.g./base-path
)next/navigation
redirect
to another page to a server page (e.g.redirect('/sub-path')
)Describe the Bug
the URL changed to a path without including the
basePath
, resulting in Error 404Expected Behavior
like with
Link
fromnext/link
, the base path should be prependedWhich browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: