404页面将如何工作

This is my error page i dont know exactly what is but i want to redirect this kind of error to 404.html page:

Error

  1. I have created a 404 error page name "404.html". I want to redirect to this if no file or folder exist in my server.
  2. Where do I have to place this page (404.html)?
  3. Is it possible to redirect this page in .htaccess (or possible with only .htaccess)?
  4. If is there anything more about 404 page let me know, I want to grab the knowledge.

And don't vote me down if possible of copy!

I want to map one error document file for 404 500 i am trying with this code.

ErrorDocument 404 /404.html
ErrorDocument 500 /404.html

RewriteEngine On
RewriteBase /

# map them to one error document:
RewriteCond %{REQUEST_URI} ^/404/$ [OR]
RewriteCond %{REQUEST_URI} ^/500/$
RewriteRule ^(.*)$ /404.html [L]

I tried this code and uploaded the file in main folder www.website.com/404.html

  1. No answer needed.
  2. Where you want on your server
  3. Yes : ErrorDocument 404 /yourPath/404.html
  4. Google and Apache docs are your friends.

Edit : You add an image on your question. This is a 500 Internal Server Error, and not a 404 Page not Found error. Handle it with

ErrorDocument 500 /yourPath/500.html

But if your .htaccess file is corrupted and cause this error, you first have to fix your .htaccess file.

You can specify the document for error handling inside .htaccess similar to one below

ErrorDocument 404 /404.htm

This will override apache's default 404 page. The 404.htm will be inside your root folder.

https://www.addedbytes.com/articles/for-beginners/error-documents-for-beginners/

Its easier then I expected just gave full url:after reading documentation.and it worked.

ErrorDocument 404 http://www.website.com/404.html
ErrorDocument 500 http://www.website.com/404.html