PDA

View Full Version : Apache Directory Browsing?


fantom
Sun 12th Nov '00, 8:48pm
How can I turn off directory browsing in Apache, so the user get 403 error or something when he tries to view some of my directories?
I need this to be turned off for the whole site, not some specific directories, and I'm using Apache on Win2000 so CHMOD-ing won't help.


And how can I limit who is linking to my files throug-out the site... for example, I want to allow only MYDOMAIN.COM to be able to link to the files, and everyone else would be blocked out or redirected...

That .htaccess file I saw on one of the threads around here works only for directory it is located in... I need something that will work for the whole site.

The .htaccess I mentioned looks like this:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://coverz.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.coverz.com/.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG)$ - [F]

AWS
Tue 21st Nov '00, 10:04pm
Put Options All -Indexes in .htaccess in root dir.
Bob