I thought I came up with a solution, but I've run into
one small problem. The issue is that if a template
isn't found (due to an incorrect url for example), I
get a 200 for the incorrect url in the access_log,
which I don't want. If I use a status of SERVER_ERROR,
or NOT_FOUND, I run into the header problem again. I'd
also like to log the template->error as well...but
since this isn't a server error,
$r->log_reason($message, $r->filename) won't work
(though I think can I deal with that). I really just
like to use the same 404 page for TT and Apache errors
and have it log correctly.

Thanks....
--

$template->process($file, $params)
  || error_msg($r, OK, $template->error());

sub error_msg {
    my($r, $status, $message) = @_;

    # Read error file and print to browser
    my $filename =
'/usr/local/apache/htdocs/error.html';
    my $fh = Apache::File->new($filename) or return
FORBIDDEN;
    $r->send_fd($fh);
    close $fh;
    return $status;

}

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com


Reply via email to