perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Johnson <solut...@gina.net>
Subject Re: Loading Index.pl as the Root File
Date Mon, 23 Apr 2001 20:40:06 GMT

Al Morgan wrote:

> I've been studying Slash to better understand mod_perl.  I think I
> understand everything that happens in the config file, except for this:
>
> <Location ~ "^/$">
>         SetHandler "perl-script"
>         PerlHandler Slash::Host::slashcode::rootHandler
> </Location>
>
> Apparently, whenever the user reqests the root document (normally
> index.html), it calls rootHandler, which redirects it to index.pl.  My
> question is:  What does the ~ "^/$" mean?  I don't quite understand how
>

It is a regular expression:
the '~' tells apache it is a regex,
The '^' says starts with
The '$' says ends with
So in other words: If the location selected starts and ends with a / (which
would normally default to the index.html) it should be processed instead by
the command in the Location directive.


> they are doing what they're doing.
>
> Thanks,
>
>         Al Morgan [ almorgan@pdxlinux.org ]


Mime
View raw message