workaround, Re: [TriLUG] Apache 2 not recognizing index.html with mod_perl / RT

Jeremy Portzer jeremyp at pobox.com
Mon Jul 19 15:27:53 EDT 2004


On Mon, 2004-07-19 at 15:09, Jeremy Portzer wrote:
>  as the file itself works fine with or without
> Options +Indexes, e.g. the following works:
> 	http://server.example.com/rt/index.html
> But the following does not work:
> 	http://server.example.com/rt/
> The latter either returns the 403 (with Directory Index Forbidden by
> Rule), or if "Options +Indexes" is set, it shows the directory index. 
> Neither of these should happen because it should be displaying/executing
> index.html instead!
> 
> However, I did verify that the behavior is correct in other places, such
> as the server root itself http://server.example.com/, and in other
> arbitrary locations that don't have mod_perl hooks set up.  But I don't
> understand why mod_perl should make a difference in whether or not
> index.html is executed.

Well, I came up with a workaround that seems to be okay for now:

    RedirectMatch permanent (.*)/$ /$1/index.html
 
I also tried the following, which would be nicer since it wouldn't
require a separate HTTP request, but it doesn't work, I think due to
strange issues with how it interacts with mod_alias:
    RewriteRule (.*)/$ /$1/index.html

I'm still curious as to why the original configuration doesn't work,
though.  My guess is that somehow the use of the Perl script is
disabling the effect of the DirectoryIndex directive, but it certainly
doesn't do this in Apache 1.3.

--Jeremy

-- 
/---------------------------------------------------------------------\
| Jeremy Portzer        jeremyp at pobox.com      trilug.org/~jeremy     |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F  E135 6F9F F7BC CC1A 7B92 |
\---------------------------------------------------------------------/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20040719/b3049388/attachment.pgp>


More information about the TriLUG mailing list