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