404 error custom.

1/ Fichier d'erreur. Ouvrir :

/404custom/404.html

Ajouter :

<!doctype html>
  <head>
    <meta charset="utf-8">
    <title>Custom 404</title>
  </head>
  <body>

Custom 404

2/ Fichiers de test.

/index.html

Ajouter :

<html>
    <head>
    </head>
    <body>
        Page index
    </body>
</html>

Ouvrir :

/404custom/index.html

Ajouter :

<html>
    <head>
    </head>
    <body>
        Page index
        Custom 404
    </body>
</html>

Ouvrir :

/404custom/test.html

Ajouter :

<html>
    <head>
    </head>
    <body>
        test
    </body>
</html>

3/ Fichier '.htaccess'. Ouvrir :

/.htaccess

Ajouter :

ErrorDocument 404 /404custom/404.html
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /404custom/404.html [L]

4/ Tests. Fichiers qui existent : http://essai.espace-bidouilleur.fr/index.html http://essai.espace-bidouilleur.fr/404custom/test.html Fichiers ou répertoires qui n'existent pas : http://essai.espace-bidouilleur.fr/404custom/coucou.html http://essai.espace-bidouilleur.fr/aurevoir