Forum Moderators: phranque

Message Too Old, No Replies

blocking directory browsing in Apache 1.33

I want to block directory browsing but allow linking to individual files

         

Beachgeek

6:16 am on Mar 18, 2006 (gmt 0)

10+ Year Member



Hi,

I have a webserver setup for business and personal use on my xp system.
I have used apache 1.33 several times and can do basic configurations with it.
Concerning some directories; I would like to be able to link to files (.jpg,.gif,.doc,etc.) individualy from another website and server but don't want the directories to be browsable.
I put this in the directory

<Directory "/Apache/dir/images">
Options Indexes

Order allow,deny
deny from all
</Directory>

but this blocks access to all files in addition to the directory.
I know this is probably a simple fix but I am a little confused by the apache documentation on directory access.

Also, what is a good resource on making .htaccess files if this is needed?

Thanks,

Carlos

jdMorgan

1:58 pm on Mar 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Carlos,

Welcome to WebmasterWorld!

Delete all of that stuff and use this single line in your .htaccess file:


Options [b]-In[/b]dexes

(Note the "-" in front of "Indexes.")

More info: [httpd.apache.org...]

Jim

Beachgeek

11:11 am on Mar 20, 2006 (gmt 0)

10+ Year Member



Thank You Jim,

I appreciate the help and the welcome!

Do you know a good resource for learning to write .htaccess files and for making a members only extranet that is password protected?

Thanks again,

Carlos