You are not logged in.

#1 2009-11-28 00:21:01

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Creating a custom 404 page.

# Removed do to email appearing on Google search. #

Last edited by MindTooth (2011-01-01 21:57:05)

Offline

#2 2009-11-28 01:25:28

kermana
Member
Registered: 2009-04-13
Posts: 60

Re: Creating a custom 404 page.

I have never set a custom 404 page for a vhost but http://www.404-error-page.com/404-creat … page.shtml seems like it could help.
And also the says says add it to the VirtualHost section not the directory one.

Last edited by kermana (2009-11-28 01:35:21)

Offline

#3 2009-11-28 02:57:45

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: Creating a custom 404 page.

Thank you.

Offline

#4 2009-11-28 16:24:51

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: Creating a custom 404 page.

The way I have done it in a very simple way is to create an .htaccess file in the root directory of the site in question with the following lines:

# serve custom error pages
ErrorDocument 400 /SMART/errors/400.html
ErrorDocument 401 /SMART/errors/401.html

where:
> SMART in the directory name (root directory) where your index.html or index.php or index.py  file resides.
> errors is the sub-directory where all the different error files exit.

And that's it. Make sure you do not allow the .htaccess file to be accessible by web users (make it non-browsable).

That's it.

Hope this helps.

R.

Last edited by ralvez (2009-11-28 16:25:58)

Offline

Board footer

Powered by FluxBB