-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom 404 page not working on Vercel (output mode static) #9578
Comments
Instead of a repro, you could create a minimal github repo (I didn't have a look but looks like it's already the case) and host the website on vercel until this issue is closed |
Hi! If you consider this repository minimal, it's already hosted on vercel (https://cosimomatteini.com/). Otherwise, I can create a new repository with minimal setup. |
Not really minimal imo. Have a look at #9206 to see an example |
Hello @devmatteini. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
Can you try |
Here it is a minimal repo to reproduce the issue: https://github.com/devmatteini/astro-vercel-404-issue |
I installed it, but it didn't solve the issue |
@lilnasy Starting from your patch, I changed the |
Forgot I was doing regex 😭 Thanks for looking into it! |
Thank you @lilnasy for your work! |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
static
I use vercel cli:
This is the repository: https://github.com/devmatteini/website
I just ported this repository from Next.js to Astro, so I might have done something wrong somewhere.
Just to give more information, I can see from Vercel deployment
Source
tab that the deployed files and the 404.html exists (.vercel/output/static/404.html
).This is the rest of the content:
Interestingly, if you go to
https://<domain>/404.html
the custom 404 page is rendered correctly.What's the expected result?
The custom defined 404 page should be used instead of Vercel's default one when reaching a non-existing route
Link to Minimal Reproducible Example
I'm not sure a minimal example with Vercel is doable since it would require a personal Vercel account
Participation
The text was updated successfully, but these errors were encountered: