Hiding draft pages from browsers, search engines

Steve Thomas sthomas at library.adelaide.edu.au
Sun Mar 22 20:03:39 EST 1998


At 11:55 AM 22-03-98 -0800, Liz Best wrote:
>> Date: Sun, 22 Mar 1998 09:45:46 -0500 (EST)
>> From: <morganj at iupui.edu>
>>
>> One exception seems to be if there is no index or home file in the
>> directory, the browser returns a list of files in the directory.
>This is also true, if the web server allows directory browsing. Your
>webmaster sets this on a site basis.

This can also be set on a per-directory basis, at least if you are using
Apache as server and assuming the administrator has allowed per-directory
modification of the default rules. This is done by placing a file called
'.htaccess' (default) into the directory concerned, with the file
containing the line:

	OPTIONS -Indexes

Of course, you can just as easily prevent indexing by adding an index page
to the directory (which doesn't have to contain anything but a privacy
message). But the .htaccess method has lots of other uses too -- in the
case mentioned of wanting to give access to local staff but not to
outsiders, .htaccess can be used to good effect by modifying the access
rules -- limiting by IP or by username/password.
 

If you haven't got Apache (or NCSA Httpd which is very similar), then ... I
don't know. But any worthwhile server should have similar support options.


Steve
 ___________________________________________________________________________
 Stephen Thomas, Senior Systems Analyst
 Mail : Barr Smith Library, The University of Adelaide, South Australia 5005
 Phone: (08) 8303 5190                                   Fax: (08) 8303 4369
 Email: sthomas at library.adelaide.edu.au
 URL  : http://library.adelaide.edu.au/ual/staff/sthomas.html
 ** Unless otherwise stated, the content of this message reflects only my **
 ** own opinion, and not the policy of the University of Adelaide Library.**

 "I must Create a System, or be enslav'd by another Man's" -- William Blake



More information about the Web4lib mailing list