TheProphet has asked for the wisdom of the Perl Monks concerning the following question:
Hi y'all,
I'm handling Apache errors through seperate shtml files. That surely looks better than the standard error pages by the browser etc. I did this by coding in httpd.conf lines like:
ErrorDocument 403 http://levi.prodeo/errors/err_403.shtml ErrorDocument 404 http://levi.prodeo/errors/err_404.shtml ErrorDocument 405 http://levi.prodeo/errors/err_405.shtml
etcetera.
Now, I would like to handle those through a Perl script file. For that purpose I coded in httpd.conf lines like:
ErrorDocument 404 http://levi.prodeo/cgi-bin/http_err.pl?err=403 ErrorDocument 404 http://levi.prodeo/cgi-bin/http_err.pl?err=404 ErrorDocument 405 http://levi.prodeo/cgi-bin/http_err.pl?err=405
It does not complain about this URL, but the big question is:
How do I get that error number into my Perl program?
Please spare me the CPAN modules, I think they're overweight. I'd like to see what I'm coding, so simple solutions if possible...
Tnx in advance,
-------------------------
TheProphet is seeking...
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GAT/CS/CM/O d+(--) s++:+>: a? C++(+++)$ UL++(+++) P++>+++ L++>+++ E- W+++$ N++ !o !K w !O M- V? PS->$ PE+(-) Y+ PGP t+ 5? !X R- tv b+(+++) DI? !D G(-) !e h---- r+++ y?
------END GEEK CODE BLOCK------
http://www.geekcode.com
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Catching Apache error with a Perl script
by valdez (Monsignor) on Aug 20, 2003 at 11:50 UTC | |
Re: Catching Apache error with a Perl script
by tcf22 (Priest) on Aug 20, 2003 at 14:00 UTC | |
Re: Catching Apache error with a Perl script
by CombatSquirrel (Hermit) on Aug 20, 2003 at 11:44 UTC | |
Re: Catching Apache error with a Perl script
by Dog and Pony (Priest) on Aug 20, 2003 at 15:58 UTC |