On Mon, 23 Apr 2001, 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:

That is probably the single worst way to learn about mod_perl.  Slash is
the only program that makes me physically ill.  It is the single worst
piece of programming ever released upon the world.

>
> <Location ~ "^/$">
>         SetHandler "perl-script"
>         PerlHandler Slash::Host::slashcode::rootHandler
> </Location>
>

The "~" means to use a regular expression to match the path part of the
URI.  The regular expression "^/$" matches only exactly the string
consisting of a single slash character, so there is no point to using a
regular expression there (as far as I can tell).  Also, in Apache 1.3,
<LocationMatch> is preferred over <Location ~>.

At least now we know why slashdot is so slow: regex matchine on every
request.

> 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
> they are doing what they're doing.

-jwb

Reply via email to