Rewrites failing after deployment
See original GitHub issueWhat version of Next.js are you using?
10.0.5
What version of Node.js are you using?
15
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
K8S
Describe the Bug
Each time after deploying we have a small blip of rewrites failing. It looks like next.js is redirecting users to the rewritten URL which then causes a 404.
Expected Behavior
For users never to be redirected to the rewritten URL’s.
To Reproduce
I’m not sure how to reproduce this yet, working on that case. But our rewrites look something like:
{
source: "/plans",
destination: "/legacy/funnel-fragment/plans"
}
ELB logs of people going to the pages that yield a 404 (/legacy/funnel-fragment/plans) and all other pages that have a rewrite enabled. As you can see it started happening on Jan 21, which is when we upgraded from Next@10.0.3 to Next@10.0.5.

Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Reverting back to 10.0.3 fixed this issue. Would be great to look at this though because we wanted to use the optimizations to next/image!
I feel like this PR might be fixing it: https://github.com/vercel/next.js/pull/21410, but need to test it still.