Open luukdv opened 2 years ago
Updated the reproduction repository to use Next 13.
I am experiencing the same issue using nextJS 13.4.3. Any solution?
I found a workaround to "fix" this issue: setting the target
property of the Link component to any value different from _self
(understanding what each value means and what behavior we will expect).
Any updates on this? Quite an annoying issue, I don't feel like the whole NextRequest/NextResponse logic is well documented, I can barely figure how it changes the "flow" or find any documentation on things like "ResponseInit", as well as the response object itself and what I can modify on it.
Verify canary release
Provide environment information
Describe the Bug
When using version 12.2 or higher, rewrites from middleware will add a query parameter when linking to a dynamic route. It doesn't add the parameter when visiting a url directly.
For a dynamic route that's defined as
/pages/[...page].js
, the parameter that's added will be?page=…
.Expected Behavior
No query parameter is added; client-side navigations work the same as server-side page loads.
Link to reproduction
https://github.com/luukdv/next-bug-2
To Reproduce
npm i && npm start
/pages/test/
instead of/pages/test/?page=test