How to disable directory view on a web server?

Oct 19, 2000
17,860
4
81
A friend was wanting to deny users to be able to view the directories of folders with no index file on his domain. I think I remember reading somewhere at some point that you could do this.

Can anyone help me with this?
 

Anubis

No Lifer
Aug 31, 2001
78,712
427
126
tbqhwy.com
IDK buy im hyjacking your thread and want to know why directory listing was working on my site and the BAM does not work anymore
 

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
Originally posted by: blurredvision
A friend was wanting to deny users to be able to view the directories of folders with no index file on his domain. I think I remember reading somewhere at some point that you could do this.

Can anyone help me with this?

um.. wrong forum..

and you have to be way more specific..

is it Unix, Windows, Apple, Commodore, etc... ???

IIS, Apache, TUX??

YOU CAN DO IT. GOOGLE!
 
Oct 19, 2000
17,860
4
81
Originally posted by: TechBoyJK
YOU CAN DO IT. GOOGLE!

If everybody googled everything, this forum would have half the traffic it does now. Some of us prefer the response of a real person instead of a machine.
 

Mr Pickles

Diamond Member
Feb 24, 2006
4,103
1
0
Originally posted by: blurredvision
Originally posted by: TechBoyJK
YOU CAN DO IT. GOOGLE!

If everybody googled everything, this forum would have half the traffic it does now. Some of us prefer the response of a real person instead of a machine.

And if everyone stopped diggjacking this forum would be dead.

OP, google htaccess.
 

Anubis

No Lifer
Aug 31, 2001
78,712
427
126
tbqhwy.com
Originally posted by: MrLee
Originally posted by: blurredvision
Originally posted by: TechBoyJK
YOU CAN DO IT. GOOGLE!

If everybody googled everything, this forum would have half the traffic it does now. Some of us prefer the response of a real person instead of a machine.

And if everyone stopped diggjacking this forum would be dead.

OP, google htaccess.

pickles are cucumbers
 

Specop 007

Diamond Member
Jan 31, 2005
9,454
0
0
Originally posted by: Anubis
Originally posted by: MrLee
Originally posted by: blurredvision
Originally posted by: TechBoyJK
YOU CAN DO IT. GOOGLE!

If everybody googled everything, this forum would have half the traffic it does now. Some of us prefer the response of a real person instead of a machine.

And if everyone stopped diggjacking this forum would be dead.

OP, google htaccess.

pickles are cucumbers

Proof?
 

jjones

Lifer
Oct 9, 2001
15,424
2
0
Assuming he's on apache, put this into an .htaccess file in the root directory:

Options All -Indexes
 

FreshPrince

Diamond Member
Dec 6, 2001
8,361
1
0
take the hdd out, smash it on the floor, I bet no one will be able to directory view anymore....:laugh:

but before you do that, link the website so that we can all take a look ;)

like tekboi sez, need OS/webserver type info.

 

skyking

Lifer
Nov 21, 2001
22,828
5,999
146
.htaccess will only work if you allow overrides in the directory as defined in either the apache.conf file or in the default sites-enabled file for your domain.
Example:

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
*AllowOverride All*
Order allow,deny
allow from all
You can .htaccess all you want, but if the line I commented says
AllowOverride none

the .htaccess override won't work.
 

skyking

Lifer
Nov 21, 2001
22,828
5,999
146
Originally posted by: Joemonkey
Just put a blank index.htm file in each directory

:)

I like that, the soothing white one, or pick some other nuetral color:p