navigate to the root path using localhost (localhost:3000)
Describe the Bug
It render the root page content instead of the rewritten one that's configured on next.config.js
Expected Behavior
Since there's a afterFiles rewrite in effect for the host localhost it should rewrite and render the page inside the rewritten path instead.
It works fine if the rewrite is defined as a "beforeFile" one.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue or a replay of the bug
https://github.com/lu-zen/nextjs-rewrite-afterfiles-bug
To Reproduce
localhost:3000
)Describe the Bug
It render the root page content instead of the rewritten one that's configured on
next.config.js
Expected Behavior
Since there's a afterFiles rewrite in effect for the host
localhost
it should rewrite and render the page inside therewritten
path instead. It works fine if the rewrite is defined as a "beforeFile" one.Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response