You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2006/08/23 08:09:22 UTC
FW: index.html
> -----Original Message-----
> From: Williams, David G. (HQ-OA000)[INDUS]
> [mailto:david.g.williams@nasa.gov]
> Sent: Friday, November 17, 2006 3:54 PM
> To: embperl@perl.apache.org
> Subject: index.html
>
> I have a number of sites that I have created with Embperl
> over the years so I am a little embarrassed to ask the
> following question:
>
> If I had a domain named something like
> "horseheadbookends.com" and I wanted Embperl to default to
> "index.html" if the user does not specify a page name in the
> request, how would I do that?
>
> For example the person types "http://horseheadbookends.com
> <http://horseheadbookends.com> " into the browser's URL bar
> and I want them to automatically go to
> "http://horseheadbookends.com/index.html
> <http://horseheadbookends.com/index.html> ". I have never
> been able to figure this one out.
>
> Thanks.
>
>
** Virus checked by BB-5000 Mailfilter **
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: index.html
Posted by Gerald Richter <ri...@ecos.de>.
> >
> > I have a number of sites that I have created with Embperl over the
> > years so I am a little embarrassed to ask the following question:
> >
> > If I had a domain named something like
> "horseheadbookends.com" and I
> > wanted Embperl to default to "index.html" if the user does
> not specify
> > a page name in the request, how would I do that?
> >
> > For example the person types "http://horseheadbookends.com
> > <http://horseheadbookends.com> " into the browser's URL bar
> and I want
> > them to automatically go to "http://horseheadbookends.com/index.html
> > <http://horseheadbookends.com/index.html> ". I have never
> been able
> > to figure this one out.
> >
The problem is that mod_index is responsible for changing requests to / to
/index.html. This does not work if Embperl gets the request before
mod_index. So this can be changed either by the load order of the modules
or, even more simple, by placeing the Embperl directives inside a <file>
block, like
<Files *.html>
PerlHandler Embperl
</Files>
This makes sure Embperl gets only the html files and not the requests to a
directory, which mod_index can then transform correctly
Gerald
** Virus checked by BB-5000 Mailfilter **
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org