Thursday 3 November 2016

Published 03:50:00 by with 0 comment

How to create custom 404 error pages

Hi,
In this tutorial, I will show you how to create custom 404 error pages.
First, you have to create a .htaccess file in the root of your web site.

This is the content of your .htaccess file:
.htaccess
1
ErrorDocument 404 /erreur_404.html

Then, you have to create the page erreur_404.html, she will be the custom 404 error page:
1
2
<h1>404 Error</h1>
<h3>The page you are looking for does not exist.</h3>

If you want to customize other errors you only have to add another line in the .htaccess file and to create the custom page of your error.

I hope this trick will be useful.
      edit

0 comments:

Post a Comment