-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Generate a static 404 page #966
Comments
there is, just read the docs https://nuxtjs.org/guide/views/#error-page |
I'm not sure if you understood the issue correctly. I'm aware of the error template, but it is not generated for a static site made with |
Maybe, adding 404 to the routes in the nuxt.config.js
and if that does not work try creating a |
Sure, it works, but it generates a suboptimal path: |
if that does not work out of the box with your server, try adding this to your .htaccess |
@alexchopin Hey. 👋 I'm looking for the same option, due to netlify's nature I have to generate a |
The problem is that a
I can add a generate option for a 404 page but not 100% sure if everyone need it? |
I would prefer it, with the following reasons:
|
I also would prefer this functionality out of the box, and even for more than a 404 error, any kind of standard error like 400, 500. And manually creating the content with asyncData and conditionals for each code anyone wants to support |
Most of the status code won't happen on static websites. 401 and 403 do happen, so at most those could be sensible. |
For static website, only a 404 page is needed. |
Sounds good. By the way, is it possible to remove the verbose error message too? |
The message about files generated? |
I mean this one:
|
I have the same issue. How to use 404 with Why this issue is closed? Where's the answer? |
I've checked...All right,
|
@Katarzina so this is webserver issue? I am using nginx. I tried some 404 nginx settings, but still not working. Any tips about nginx? |
I've checked...All right,
|
I'd made experiment with my nginx local server
It was enough...
kp.cz - my name server |
@Katarzina thank you, I will try tomorrow! |
So, at last I tried that. All I need is just one line in nginx config |
Hi @alexchopin, is there a known way to have this automatic 404 generation for multiple 404.html files, in different languages? Like: 404.html and 404_en.html? EDIT: To do something like:
https://www.netlify.com/docs/redirects/ Thanks for any help on this! 🙏🏻 UPDATE: |
I have a static generated site with page/404/index.vue generated to /404.html. |
this seems to generate 404.html page in the root without any problems. Also working fine with Firebase |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Most static hosting providers provides an option for custom error page, and it should be possible to prerender the error template too.
The text was updated successfully, but these errors were encountered: