Error Pages
Posted: 20th June 2008 01:59 AM

I’d like to create my own error pages.  For example instead of the Error 404 Error - File Not found that displays on my site (http://www.kids-play.org/Downloads/index2.html) I want to create my own in RapidWeaver and display.

Anyone know how this is done?

Thanks,

J.

#1.  Posted: 20th June 2008 02:43 AM
HoGiHung - 20 June 2008 01:59 AM

I’d like to create my own error pages.  For example instead of the Error 404 Error - File Not found that displays on my site (http://www.kids-play.org/Downloads/index2.html) I want to create my own in RapidWeaver and display.

Anyone know how this is done?

Thanks,

J.

Think I figured it out.  I need to use the control panel of my web host to specify files for each of the error types it has listed.  You should be able to see my 404 Error now.  Guess I need to go build the other error pages now.

J.

#2.  Posted: 20th June 2008 03:18 AM
HoGiHung - 20 June 2008 02:43 AM
HoGiHung - 20 June 2008 01:59 AM

I’d like to create my own error pages.  For example instead of the Error 404 Error - File Not found that displays on my site (http://www.kids-play.org/Downloads/index2.html) I want to create my own in RapidWeaver and display.

Anyone know how this is done?

Thanks,

J.

Think I figured it out.  I need to use the control panel of my web host to specify files for each of the error types it has listed.  You should be able to see my 404 Error now.  Guess I need to go build the other error pages now.

J.

Hello J,
This is really easy to achieve if you are hosted on an Apache/LINUX server.

My own, custom error page can be viewed here.

The first thing I did was build my 404 error page in RW, and then selected the option to not show the page in the navigation menu. The 404 page can have the suffix .html or shtml (.shtml should render slightly faster, particularly if you have a very large site.)

The advantage of building your 404 page as an integral part of your RW-based website, is that a person getting the error can then simply navigate to another page.

After this I added the following code to my ever-present .htaccess file:

ErrorDocument 404 http://www.your-domain.com/404.html

...where ’your-domain.com‘ should be replaced with your own domain name and ’404.html‘ (or 404.shtml) should be replaced with the name of your 404 custom error page.

by defining an absolute (full) file path, the custom 404 page will show regardless if the error occurs at root or through a sub directory of your site.

Additional error pages can be added in the same way.

Kind regards
John

#3.  Posted: 20th June 2008 04:19 PM
aoimedia - 20 June 2008 03:18 AM
HoGiHung - 20 June 2008 02:43 AM
HoGiHung - 20 June 2008 01:59 AM

I’d like to create my own error pages.  For example instead of the Error 404 Error - File Not found that displays on my site (http://www.kids-play.org/Downloads/index2.html) I want to create my own in RapidWeaver and display.

Anyone know how this is done?

Thanks,

J.

Think I figured it out.  I need to use the control panel of my web host to specify files for each of the error types it has listed.  You should be able to see my 404 Error now.  Guess I need to go build the other error pages now.

J.

Hello J,
This is really easy to achieve if you are hosted on an Apache/LINUX server.

My own, custom error page can be viewed here.

The first thing I did was build my 404 error page in RW, and then selected the option to not show the page in the navigation menu. The 404 page can have the suffix .html or shtml (.shtml should render slightly faster, particularly if you have a very large site.)

The advantage of building your 404 page as an integral part of your RW-based website, is that a person getting the error can then simply navigate to another page.

After this I added the following code to my ever-present .htaccess file:

ErrorDocument 404 http://www.your-domain.com/404.html

...where ’your-domain.com‘ should be replaced with your own domain name and ’404.html‘ (or 404.shtml) should be replaced with the name of your 404 custom error page.

by defining an absolute (full) file path, the custom 404 page will show regardless if the error occurs at root or through a sub directory of your site.

Additional error pages can be added in the same way.

Kind regards
John

Excellent!  I will try your method and see how it works.  Might be easier than trying to set it up via my web host control panel.

J.

#4.  Posted: 16th September 2008 08:32 AM

Where can I Find the .htaccess file ?

#5.  Posted: 16th September 2008 12:41 PM
Pascal Mabille - 16 September 2008 08:32 AM

Where can I Find the .htaccess file ?

Hello

Some hosts will supply one already made (though normally blank) and sitting in your root directory, other times you will have to write one yourself (not difficult.) Either way you will need to use an FTP client to find it on the server and/or upload a fresh one.

Comprehensive guide to .htaccess.

Kind regards
John

#6.  Posted: 17th January 2010 06:29 AM

If anyone reading this thread uses EnomCentral hosting you should be aware that you will need to enable “custom error docs” in your IIS control panel (Windows hosting) or your Plesk control panel (Linux hosting).