close!

Comments:

(0 comments so far)
Name:
Email:
URL:
Comments
404 error

While continuing to work on my new framework, I almost forgot that I need to make a nice 404 error webpage. When making this I came to think, why not make it a functional page... Therefore, this post about 404 pages will also be a tutorial on how to make one and I will show some nice examples of 404 pages.

What?

So, what is a 404 error page? It is the page that you get redirected to if you are trying to access a file that was not found on the server.

You might actually have tried to access a file on my server that did not excist, but ended up here, because this is my 404 page.

Why?

Instead of showing some ugly error created by your webbrowser or webserver (the image above), you might want to redirect people your sitemap or something like that so they can find their way to your content. Any good product will handle errors with grace. You only have to put a little bit of effort in it.

How?

The most common way of handling 404 errors is by using the ".htaccess" file.

ErrorDocument 404 /error.html

If you place this line of code in your .htaccess file in the root directory of your webpage, it will redirect 404 errors to error.html.

Some examples:

CSS-Tricks.com:

css-tricks 404

Cssremix.com:

cssremix 404

Brightkite.com:

brightkite 404