Brady Richards ([EMAIL PROTECTED]) said something to this effect:
> hi all,
>
> this is probably a bone headed question, but two of us here have been
> beating our heads against it for a day and a half now, so i figure i
> might as well ask (since i couldn't find an answer in the docs or the
> archives).
>
> we're running apache 1.3.12 and mod_perl (EVERYTHING=1) 1.3.24, and we
> have written a little handler to do some simple find and replace in
> html files before returning them. it works fine when given and explicit
> url (http://foo.com/bar/index.html) but on a request to http://foo.com/bar/
> or http://foo.com/bar, the filename that $r->filename() gives is
> /base/dir/bar/ and /base/dir/bar respectively. shouldn't the translation
> handler have kicked in already and changed this for me?
>
> i would have given up and had the module do its own directory to file
> translation, but it seems that there is no way to access the DirectoryIndex
> setting from within the module. perhaps tied up in this is the fact the
> $r->dir_config( ) returns a reference to an empty array.
>
> short snippet of http.conf
>
> <IfModule mod_dir.c>
> DirectoryIndex index.php index.phtml index.html index.taf
> </IfModule>
>
> PerlModule NetCloak::Processor
> <Location />
> AddHandler perl-script .html .htm
> PerlHandler NetCloak::Processor
> PerlSendHeader On
> </Location>
>
> any ideas? thank you
>
> brady richards
Does declining non-html files help? I.e.,
sub handler {
my ($r) = @_;
return DECLINED unless ($r->content_type eq 'text/html');
# Process HTML file...
return OK;
}
I would think that this would skip directory accesses and run when
mod_autoindex does it's internal redirect.
(darren)
--
(1) Everything depends.
(2) Nothing is always.
(3) Everything is sometimes.