You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Paul Leder <sa...@cyconix.com> on 2009/07/22 18:28:33 UTC
[users@httpd] Falling off the end of a directory listing
I've spent the last hour Googling this, without success...
Problem: is there some way to allow a directory listing which includes a
'parent' link, but *only* up to a specified top level?
In more detail, I have a site which is rooted at /var/www/html/foo.
There are some download files, which I've placed in a directory
structure at /var/www/html/foo/downloads. The user can reach the
download directory at http://www.bar.com/downloads.
There is quite a complex directory structure at 'downloads', so I've
enabled directory listing. The problem is that the user can navigate up
through the parent links all the way up to /var/www/html/foo, at which
point they get a canned version of the main site in the download window.
This doesn't really matter if the user entered the downloads URL
directly in a full-sized browser window; they just see the website.
However, the normal way to get to the downloads is via a link on the
site, which opens a small pop-up window. If they navigate up too far in
this pop-up then they just see a mess.
Ideally, the 'parent' link should disappear when the user reaches
/var/www/html/foo/downloads.
Any ideas?
Thanks -
Paul
---------------------------------------------------------------------
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] Falling off the end of a directory listing
Posted by Paul Leder <sa...@cyconix.com>.
Bob Ionescu wrote:
> 2009/7/22 Paul Leder <sa...@cyconix.com>:
>> Problem: is there some way to allow a directory listing which includes a
>> 'parent' link, but *only* up to a specified top level?
>
> May be you can restrict
> IndexIgnore .*
> to some folders via DirectoryMatch (don't know if terminating with $
> works to prevent inheritance ^/var/www/html/foo/downloads$)
Thanks - I've just been through this in detail, but I can't get it to
work. In fact, DirectoryMatch doesn't even work with a '$' - it misses
the match. I've tried lots of combinations of the basic
<DirectoryMatch "^/var/www/html/foo/downloads$">
with and without the $, the quotes, and the ^, and nothing with the $
successfully matches the directory.
I've also tried splitting the lower-level directories off as symlinks,
but nothing seems to work - IndexIgnore inheritance seems to be unbreakable.
See this bugzilla entry for general whingeing on exactly this:
https://issues.apache.org/bugzilla/show_bug.cgi?id=24243
Cheers
-Paul
---------------------------------------------------------------------
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] Falling off the end of a directory listing
Posted by Bob Ionescu <bo...@googlemail.com>.
2009/7/22 Paul Leder <sa...@cyconix.com>:
> Problem: is there some way to allow a directory listing which includes a
> 'parent' link, but *only* up to a specified top level?
May be you can restrict
IndexIgnore .*
to some folders via DirectoryMatch (don't know if terminating with $
works to prevent inheritance ^/var/www/html/foo/downloads$)
Bob
---------------------------------------------------------------------
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