Forum Moderators: coopster & phranque

Message Too Old, No Replies

.htaccess deny a directory to users

How to stop users browsing a directory

         

Nick_W

8:32 am on Jun 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi all

How might I do this? I guess .htaccess would be the easiest way?

Nick

PsychoTekk

9:35 am on Jun 28, 2002 (gmt 0)

10+ Year Member



hi Nick, put this line into your conf file:
Options -Indexes

<added>
oh, nearly forgot, should work in .htaccess as well :)

Nick_W

1:48 pm on Jun 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Phyko!

I actually ended up doing 2 things:

First this in my .htaccess

<Files>
Order Allow,Deny
Deny from all
</Files>

and secondly helped the client switch to a more professional host where he wont be required to keep scripts and stuff in the http root ;)

Nick