You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by David Wolever <wo...@gmail.com> on 2006/01/17 04:27:53 UTC

[users@httpd] IndexIgnore is Ignored With Multiple Slashses

I have noticed that mod_autoindex ignores the IndexIgnore
directive if there is more than one slash after the
domain name.  For example:
http://wolever.net/autoindex/
http://wolever.net//autoindex/
The htaccess file is included in the directory list.
This seems to affect directories recursively, but the extra
slashes must be right after the domain name:
http://wolever.net///autoindex/test/
ignores IndexIgnore, where as:
http://wolever.net/autoindex//test/
does not.
As far as I can tell, the only changes I have made to
httpd.conf that might have something to do with this is:
IndexOptions FancyIndexing NameWidth=* DescriptionWidth=*
Other than that, its Apache 1.3.31 running on Gentoo.
I have confirmed this bug/feature on my external host:
http://nfs.wolever.net/test/
They are running Apache 1.3.34.  More info here:
http://example.nfshost.com/phpinfo.php
While it is not vital for any of my hosts, I thought it
might be worth getting out there.
David

PS: I'm terribly sorry if this has already been reported...
but it is terribly hard to Google.

--
  David Wolever - http://wolever.net/~wolever
  AIM: davidswolever MSN: david@wolever.net
  P: 416-769-0318 C: 416-906-0403
  "Without payment you have received; without payment you are to give."
       (Mat 10:8 ISV)

Re: [users@httpd] IndexIgnore is Ignored With Multiple Slashses

Posted by Joost de Heer <sa...@xs4all.nl>.
Robert Ionescu wrote:
> David Wolever wrote:
>> I have noticed that mod_autoindex ignores the IndexIgnore
>> directive if there is more than one slash after the
>> domain name.

Dirty fix (untested):

RewriteCond %{REQUEST_URI} (.*)/{2,}(.*)
RewriteRule (.*)/{2,}(.*) $1/$2 [N]

Joost


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] IndexIgnore is Ignored With Multiple Slashses

Posted by Robert Ionescu <ro...@googlemail.com>.
David Wolever wrote:
> I have noticed that mod_autoindex ignores the IndexIgnore
> directive if there is more than one slash after the
> domain name.

I reopened bug 16013, I can confirm this behavior, too.

-- 
Robert


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] IndexIgnore is Ignored With Multiple Slashses

Posted by David Wolever <wo...@gmail.com>.
I put the IndexIgnore directive in the .htaccess file in the
directory to be listed (you can see them on-line too).
The only place I could have used <Location > is in
httpd.conf.  I have checked the problem on a few different
machines with different setups and it still seems to happen.
I just tested it on my mac (OSX 10.4.4 with Apache 1.3.33)
using <Directory > in httpd.conf:
<Directory /Library/WebServer/Documents/x/>
        IndexIgnore abc
</Directory>
and I can still bypass the IndexIgnore.
David
(I will take the tip about <Directory > VS <Location > though -- I
know I've used it for things in the past)

On 1/17/06, William A. Rowe, Jr. <wr...@rowe-clan.net> wrote:
> David Wolever wrote:
> > I have noticed that mod_autoindex ignores the IndexIgnore
> > directive if there is more than one slash after the
> > domain name.  For example:
> > http://wolever.net/autoindex/
> > http://wolever.net//autoindex/
> > The htaccess file is included in the directory list.
>
> Dollars to donuts you broke rule one, don't use <Location > blocks to describe
> your filesystem layout, always use <Directory > blocks.  The URI '//' is not
> the same as the URI '/', and Location's follow URI's. This behavior is by
> design.
>
> If I'm wrong, let us know exactly where you put your IndexIgnore directive.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] IndexIgnore is Ignored With Multiple Slashses

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
David Wolever wrote:
> I have noticed that mod_autoindex ignores the IndexIgnore
> directive if there is more than one slash after the
> domain name.  For example:
> http://wolever.net/autoindex/
> http://wolever.net//autoindex/
> The htaccess file is included in the directory list.

Dollars to donuts you broke rule one, don't use <Location > blocks to describe
your filesystem layout, always use <Directory > blocks.  The URI '//' is not
the same as the URI '/', and Location's follow URI's. This behavior is by
design.

If I'm wrong, let us know exactly where you put your IndexIgnore directive.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org