Clayton Mitchell ([EMAIL PROTECTED]) said something to this effect:
> I then noticed that URI's of directories lacking a trailing '/' were not
> being redirected in the browser and so relative links started to break.
In your handler subroutine, do something like:
return DECLINED if ($r->content_type =~ /directory$/i);
or
return DECLINED if (-d $r->filename);
HTML::Mason has this problem; Locations handled by Mason are all given to
the default handler subroutine, which needs to decline directory requests.
(darren)
> As a w/o I installed a TransHandler listed below to modify the URI. It
> seems like I am re-inventing the wheel here and so I assume I did something
> wrong to get to this point?
> Thanks for any advice.
>
>
> package Tofu::Tofugruff;
>
> #use Apache::Constants qw(:common);
> use Apache::Constants qw(:response);
>
> use strict;
>
>
> sub handler {
> my $r = shift;
> my $f = $r->document_root.$r->uri;
> my $uri = $r->uri;
> if ( -d $f && $f !~/.*\/$/ ) {
> # A directory that doesn't end in a '/'
> $uri.='/'; # fix it
> $r->err_header_out("Pragma", "no-cache");
> $r->header_out("Location" => $uri );
> $r->status(REDIRECT);
> return DECLINED;
> }
> return DECLINED;
> }
>
> 1;
> __END__
>
--
I tended to place my wife under a pedestal.
-- Woody Allen