[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] RAQ3 how do you disallow index viewing?



On Sat, 1 Dec 2001, Ray Smith wrote:
> New Apache user here.  Trying to escape from the gravitational pull of my MS
> IIS systems so any help appreciated :)
> 
> I'd like to disallow viewing of indexing so that when someone enters
> http://www.website.com/dir1/  they do not see the index of the files.

You don't need to modisy the server config to do this, just create a file
named .htaccess in the dir at which, and below which you don't want
directory's listed, in it put 

Options -Indexes

That's all :)

Tho to be honest, i hate when sites do this, it means the default page is
not the index page for that part of the url, and it makes it hard for
people to find the section index via the url ...

A slightly different sneaky trick is touse a fill url for the last
filename in DirectoryIndex that points to a default 'index' page, say a
site navigation page for example..

DirectoryIndex index.html index.htm \defaultindex.html

Sneaky -/

gsh