404 error after page refresh in development/non-prod environment #13792
Replies: 3 comments 3 replies
-
The request URL changes because when using Do you happen to have a repository or example you could share with a similar setup that is failing? |
Beta Was this translation helpful? Give feedback.
-
You have to make sure to use |
Beta Was this translation helpful? Give feedback.
-
I am experiencing a similar issue however deployment method changes behaviour. On github pages the application pages can be refreshed such as https://landed1.github.io/laptop-reviews/2025/1/best-laptops-under-500 vs the live static deployment here - https://laptop-review.co.uk/2025/1/best-laptops-under-500/ I am copying the files such as about.html which get created. So the app can locate /about but on refresh the server loses them but it can see them if it is /about.html |
Beta Was this translation helpful? Give feedback.
-
Hi,
In my React.js application, I have integrated with Next.js.
On button click action, I have written code to push to new route.
Behavior:
On button click, its redirecting to dashboard route correctly. But, when I reload/refresh the page I am getting 404 error. Not sure, why Request URL change is different here.
Request URL after clicking button:
https://dev.nonprod.mem.cloud.com/_next/static/wqu4eCNPX--dTTk67LnKG/pages/dashBoard.js
Request URL after page reload:
https://dev.nonprod.mem.cloud.com/dashBoard?customerId=100
I am using like this to push the route.
Router.push({
pathname: '/dashBoard',
query: {customerId: 100}
});
Beta Was this translation helpful? Give feedback.
All reactions