You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1996/07/24 17:46:01 UTC

Re: Bad choice of directory names for info- & status-modules

> > > >If you have a directory, like we have, called "information" in your 
> > > >documentroot and use the new info_module, you can't access your 
> > > >directory "information" any more.
> > > >When you type in:
> > > > http://www.some.where/information/
> > > >as the location Apache automatically switches to the info_module page.
> > > >I suggest using a less common directory-name like "apache-info" for the 
> > > >info_module and "apache-status" for the status_module.
> 
> But the default for the info module is "/info" and not "/information".
> A little note somewhere may be called for, but since manual intervention
> in the .conf files is required to activate either of these modules, the
> person doing the configuration should be bright enough to figure out that
> he/she should check whether or not the choice of directory names would
> conflict in his name space.
> 
> -Rasmus

However, <Location /info> seems to be matching requests for things
like /information/, causing a redirect to mod_info.

I encountered this a few weeks back when I discovered that I had
broken access to a customers CGI programs (info_....cgi).  I took
a quick look at the <Location> code, and again when someone else
brought this up. Nothing jumps out at me, and I have not had time
to dig deeper.

Seems that there is some problem in <Location>





Re: Bad choice of directory names for info- & status-modules

Posted by Alexei Kosut <ak...@organic.com>.
On Wed, 24 Jul 1996, Randy Terbush wrote:

> However, <Location /info> seems to be matching requests for things
> like /information/, causing a redirect to mod_info.

Of course it is, that's what it *does*. Just like <Directory>, it looks
for files (or in this case, URLs) that match the given prefix. Except that
<Directory> tacks on a / if one doesn't exist (the theory being that it
has to be a directory), <Location> doesn't. So <Location /info> matches
any URL beginning with the string "/info". If you don't want that, you
could do use "/info/", but that means that you have to remember to have
the / when accessing the URL.

I suppose we could change the behvior of <Location> (when I think about
it, I can see arguments for making it a straight string match - with the *
and ? wildcards it supports now, of course), but it's too late name,
methinks.

-- Alexei Kosut <ak...@organic.com>            The Apache HTTP Server 
   http://www.nueva.pvt.k12.ca.us/~akosut/      http://www.apache.org/