I'm currently using a PerlHandler to handle all *.html files through the use of Template Toolkit, all working, no probs.
I wanted to also use TT to handle the ErrorDocument directives, and I was also hoping to be able to create the error pages containing stuff like "Your GET request from 1.2.3.4 on port 12345 failed...", etc. which AFAICT I get from the REDIRECT_* environment variables, (at least under CGI anyway). I've tested the variables using the /cgi-bin/printenv example from the Apache distro, and using that to handle 404s, so I could see what I had to play with, and then I came to try using my PerlHandler. When I request a page that is within the scope of the handler, (ie. *.html, but doesn't exist), I get back the variables as expected. When I request a false file that isn't covered by the handler, (ie. a fake *.tar.gz), the environment variables get doubly-prepended with REDIRECT_ so, for example, I have a REDIRECT_REDIRECT_REQUEST_METHOD variable. My snippet of httpd.conf is like this: ---8<--- ErrorDocument 404 /error.html <Location ~ ^/.*\.html$> SetHandler perl-script PerlSetVar Template_root /path/to/somewhere/src PerlHandler MyHandler </Location> ---8<--- All my handler currently does is gather all the environment variables up into one big string and pass it as a parameter to the template, where ATM I just print it. Can anyone shed any light on why this is happening, or maybe a better way to do this? My apache version is: Apache/1.3.23 (Unix) mod_gzip/1.3.19.1a mod_perl/1.26 mod_ssl/2.8.5 \ OpenSSL/0.9.6b Cheers Matt -- "Phased plasma rifle in a forty-watt range?" "Hey, just what you see, pal"