404 in prod but fine locally? #14276
Unanswered
special-character
asked this question in
Help
Replies: 2 comments 4 replies
-
I am not sure about the issue from // next.config.js
module.exports = {
experimental: {
async rewrites() {
return [
{
// redirect from page-a to page-b
source: '/page-a',
destination: '/page-b',
},
]
},
},
} |
Beta Was this translation helpful? Give feedback.
4 replies
-
its petty simple just add a vercel.json and configure it like this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I added a
getInitialProps
in the_document
component in order to add redirects on the server side like this:Locally, this redirects when I go to a route in the
redirects
, however in the built application I get a 404. Does anyone know why the built app would behave differently than when in local development? I don't understand why this would be different and why the lifecycle seems different?Beta Was this translation helpful? Give feedback.
All reactions