Eve For Enterprise    Eve Support Community    Forums  Hop To Forum Categories  Resources  Hop To Forums  Webmastering 101    Apache - Custom Error Pages
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Groupee Member
Posted
The 'Shared Web Hosting' Control Panel allows you to edit some error pages to show custom messages for the following errors :

401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

These are handy but if you change the look of your site frequently it can be tedious going in each time and editing them. Mainly because they are .shtml and although they do allow includes it would be easier if we could point it to our own php or perl scripts to handle the work. I was told via a support ticket there wasn't a way to do this but then I checked into Apache's .htaccess feature and it had a command for handling this kind of thing. Just put the following line in your .htaccess file in your root public_html directory:

ErrorDocument # /scriptpath

Example:

ErrorDocument 404 /scripts/404.php

The example above will handle any 404 Not Found Error by sending the result of the 404.php script in the /scripts directory to the user. That script can show a sitemap, display a message to help the visitor find what they are looking for, even redirect them to the homepage.

Hope that helps someone Smile
 
Posts: 281 | Registered: May 26, 2002Reply With QuoteEdit or Delete MessageReport This Post
Eve Developer
Aspiring Monkey
Posted Hide Post
Thats a nice post. Thanks for sharing that with everyone Scott.


Jonmark Weber
Developer
Groupee Inc.
 
Posts: 1887 | Location: Seattle | Registered: November 10, 2000Reply With QuoteEdit or Delete MessageReport This Post
Groupee
Posted Hide Post
I'm doing this at evedev too. Smile Pretty amusing custom errors too, if you happen to run across them.
 
Posts: 3868 | Location: Seattle, WA | Registered: January 01, 2000Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Eve For Enterprise    Eve Support Community    Forums  Hop To Forum Categories  Resources  Hop To Forums  Webmastering 101    Apache - Custom Error Pages