Ok, simple question. How to I modify the URI that gets logged? I
understand how to write it to a different file and/or to a DBI, I just
want to modify what's written to the standard access log.
I want the URI set to a file that doesn't exist, but in a format that a
log analyser and I can understand and includes info from various dynamic
pieces I'm setting with Mason. I'd like to do this for one
'special.html' file.
I've tried:.
[...]
#important piece of Apache::addToURI
sub handler {
my $r=shift;
return OK if $r->content_type =~/^image/;
return DECLINED if $r->uri !~/special/;
$r->uri("/bubba/gump.html");
return DECLINED; #also tried OK
}
1;
I want "GET /bubba/gump.html" .. to show up in the usual access_log file
as the URI that was served. It goes through the handler, so I have
things set up correctly, it's just that the URI isn't changed. What's
missing?..
Just to be complete.. or if there's something with the way I'm using
PerlLogHandler with Mason.
<Location /mason>
PerlRequire /path/to/handler.pl
DefaultType text/html
SetHandler perl-script
PerlHandler HTML::Mason
PerlRequire /path/to/Apache/addToURI.pm
PerlLogHandler Apache::addToURI
</Location>
Thanks
--
Jeff Gleixner
Seinfeldism of the moment :
Can you be a closet claustrophobic?