Gossamer Forum
Home : General : Perl Programming :

ErrorDocument

Quote Reply
ErrorDocument
Hi,

Can anyone think of a reason why the following isn't working?.......

I want to customize the error pages for each virtual host and so have added the following to the error pages....

<!--#echo var="SERVER_NAME" -->

I have renamed them to .shtml and have the follwoing in httpd.conf....

AddType text/html .shtml
AddHandler server-parsed .shtml

In access.conf, I have...

<Directory />
Options +Includes
</Directory>

.........but the tags aren't replaced with the info, I just get a blank space.

Any ideas what Im doing wrong?

I've been reading the relevant pages at the Apache site which explains how to do this but I'm sure I have done all that they said. SSI works fine for my websites. Could I be missing something in one of the conf files that is restricting SSI in the error pages directory?

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: ErrorDocument In reply to
You could separate .htaccess files in each of the virtual account folders...then reference different error page folders. I have this working in three sub-domains and two different virtual accounts.

Regards,

Eliot Lee
Quote Reply
Re: ErrorDocument In reply to
Yes this would overcome the problem as SSI is working as normal for the vhosts, it is just the special error directory in the root that doesn't seem to want to allow SSI.

I just wanted a global set of error pages, however it is probably best to let people customize them anyway....

Hmm I think that's what I'll do then.

Thanks.

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: ErrorDocument In reply to
That would probably be best rather than some hosting companies that have global error messages, which is not that user friendly since the look and feel would change in the global error pages.

Of course, you could probably play around with the httpd.conf file or write a Perl script that will check to see if there are custom error pages, if not, then the global error pages would print.

Regards,

Eliot Lee
Quote Reply
Re: ErrorDocument In reply to
Thanks for the comments Smile

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/

Quote Reply
Re: ErrorDocument In reply to
Take a look at how I handle errors. All domains have a separate error page but are the same template.

The 404 page has the time and date of the error as well as the referring page. All cosmetic of course, but look good ;-)

Code is in JScript.

http://www.insighteye.com/nothere.html

- Eraser

Quote Reply
Re: ErrorDocument In reply to
Hi,

Thanks for the reply but I think I'm going to go with Eliot's suggestion of creating seperate .htaccess files and will then change the permissions to stop the webmasters editing them.

Paul
Installations:http://wiredon.net/gt/
Support: http://wiredon.net/forum/