View Full Version : .htaccess file?
LastActionHero
January 19th, 2001, 10:59
I have a cgi-bin directory. How do i prevent users from geeting a directory listing of my cgi-bin and other directories if they type http://www.website.com/cgi-bin or http://www.website.com/directory?
Is the .htaccess file used?
cds
January 19th, 2001, 11:42
Im away from my linux machine but if I remember right you have to use a directory tag and the NoIndex imperitave...
Something like:
<directory=/somewhere>
NoIndex
</directory>
in your .htaccess file.
You should check the exact syntax... as I said I dont have my own config files in front of me...
LastActionHero
January 19th, 2001, 11:57
well i donno the syntax
i'am no *nix expert!
that's why i put up this question
Mbarb
January 19th, 2001, 15:56
you could just make sure a index.html file is in your cgi-bin directory and any other directory you don't want people to be able to get a listing for...
Nick
January 19th, 2001, 19:17
If you want to disable all directory indexes try this in the .htaccess:
Options ExecCGI Includes FollowSymLinks MultiViews
LastActionHero
January 19th, 2001, 23:23
Options ExecCGI Includes FollowSymLinks MultiViews
In which directory should i store the file? Will it disable directory listings for all my directories?
Nick
January 20th, 2001, 01:00
Originally posted by lastactionhero
In which directory should i store the file? Will it disable directory listings for all my directories?
You can store it in any one you want. It will disable all directory indexs in that folder and all of it's sub folders.
example:
http://url.com/images/ - you put it in there
http://url.com/images/ - gives no dir list
http://url.com/images/temp/ - gives no dir list
http://url.com/img/ - gives dir list
http://url.com/ - put it in there to turn off all dir lists
LastActionHero
January 20th, 2001, 01:16
thankx Nick,
it's working perfectly
muchio
January 21st, 2001, 11:52
Hi, regarding above:
If I put .htaccess in a root folder coan I specify exact subdirs which I would like to allow to be listed.
And other question:
<order deny>
deny all
</order>
can I specify subdirs?
coldtobi
January 29th, 2001, 13:25
I thought i read somewhere something like this:
</directory>
deny from all
Can someone say me if this is correct and/or if this may affect my cgi-bin (they create/modify some files)...
By the Way: I found a page, where all the Apache-Tags
are documentated. Maybe somewone helps is)
http://httpd.apache.org/docs/mod/core.html
okay, bye!
Coldtobi
Powered by vBulletin® Version 4.1.7 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.