Re: How to stop directory listing a folder
- From: Els <els.aNOSPAM@xxxxxxxxxx>
- Date: Sun, 22 Jan 2006 09:04:06 +0100
gil wrote:
> Is it possible to prevent a browser from listing the entire contents of
> a folder?
[snip]
> However, when I try "site/pagefile/images" or ".../drawings", I get a
> generic directory listing page, showing all of the files and directories
> within the named address, including a link to the parent directory. This
> is not good. If I hit the link to 'parent directory' then the
> 'home.html' file will open.
>
> I have tried putting a small .html file in each image folder but the
> tree still displays.
If you name that file index.html, you'll see the same behaviour as in
the parent directories.
> I have not tried putting a folder within the
> folder, but suspect that it would also show in the tree listing.
Yes, it will.
> This occurs in IE 6.0, Moz 1.7 and Opera 8.5.
It's on the server that this happens, not in the browser.
> Discussions on robots.txt are aimed at search engine robot crawlers, not
> the typical users browser.
Yup.
> How can I prevent the image folders from showing a generic directory
> listing, or can I get them to instead display a "list access denied"
> type of message?
Either put an index.html file in every directory, or deny directory
listings on the server. If you are on a Linux server, this is done in
the .htaccess file. If you have CPanel, you can even take care of it
without having to touch the .htaccess yourself.
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
.
- Follow-Ups:
- References:
- How to stop directory listing a folder
- From: gil
- How to stop directory listing a folder
- Prev by Date: How to stop directory listing a folder
- Next by Date: Re: PHP pages, problems with W3C Validator Local installation on Windows
- Previous by thread: How to stop directory listing a folder
- Next by thread: Re: How to stop directory listing a folder
- Index(es):
Relevant Pages
|