Re: How to stop directory listing a folder



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 -
.



Relevant Pages

  • How to stop directory listing a folder
    ... Is it possible to prevent a browser from listing the entire contents of a folder? ... 20 files all .jpg or .gif ... generic directory listing page, showing all of the files and directories within the named address, including a link to the parent directory. ... I have tried putting a small .html file in each image folder but the tree still displays. ...
    (comp.infosystems.www.authoring.html)
  • Very large Sent Items folder
    ... My sent folder has been acting strange lately, sometimes listing sent mail, ... sometimes just showing a blank. ... Then I started getting an error message ... Now my sent folder is empty. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: IE launching when Firefox is default browser
    ... default browser settings. ... misunderstand the location of the Links toolbar. ... When you said "Then reopened Ff, went to the Links folder on my ... the browser or Explorer. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: IE launching when Firefox is default browser
    ... reasons which evade me) is the process that launches the browser under the ... as I find the desktop toolbar quite handy for accessing ... When you said "Then reopened Ff, went to the Links folder on my ... the browser or Explorer. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: IE launching when Firefox is default browser
    ... After making FireFox my default ... went to the Links folder on my ... default browser via the Control Panel>Add/Remove Programs>Set Program Access ... Replies are posted only to the newsgroup for the benefit or other readers. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)