Matt Sergeant wrote:
> 
> On Mon, 10 Jul 2000, Drew Taylor wrote:
> 
> > darren chamberlain wrote:
> > >
> > > Drew Taylor ([EMAIL PROTECTED]) said something to this effect:
> > > > Hi all,
> > > >
> > > > I am using an Apache Handler module to create my home page, using
> > > >
> > > > <Location /index.pl>
> > > >     SetHandler perl-script
> > > >     PerlHandler ModuleName
> > > > </Location>
> > > >
> > > > I have DirectoryIndex set to "index.pl index.html", but the Location
> > > > directive is not being picked up for the index, so I get the default
> > > > directory listing. Is there another solution instead of a RewriteRule to
> > > > redirect "/" to "/index.pl"?  Any thoughts would be appreciated.
> > >
> > > Calling /index.pl explicitly works correctly, right?
> > Yes, /index.pl works properly. But since it's a "virtual" file, I have
> > to just type it in.
> >
> > > Replacing <Location /index.pl> with a <FilesMatch "*.pl$"> which sets the correct
> > > handler for .pl files should do it, and let mod_dir call index.pl itself.
> > Well, the thing is "index.pl" really is Base::HomePage::Anystock. What
> > I'm really looking for is a way to use a module as the directory index.
> > I'm not terribly opposed to using Rewrite, but I'm curious if there is
> > an alternative method.
> 
> Yes, use a PerlFixupHandler instead of DirectoryIndex. This use of a fixup
> handler is detailed in the Eagle book.
Now that's a good thought. I already have a fixup handler to do my
browser sniffing. But rather than write another module, I'll probably
stick with the two-line RewriteRule. :-) Now I just have to recompile
apache on my workstations because I didn't add mod_rewrite the first
time...

RewriteEngine On
RewriteRule ^/$ /index.pl [R,L]

-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/

Reply via email to