coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: SirKeats on April 17, 2007, 01:07:34 AM

Title: restrict direct directory access...
Post by: SirKeats on April 17, 2007, 01:07:34 AM
i'm not sure if this is a coppermine issue, or if it's something like an htaccess issue, but i'd like to restrict directory access somehow.

currently, when someone right clicks and image and gets the image path, they get something like:

http://www.url.com/coppermine/albums/albumname/49.jpg

and so if they want they can go back and get a full dir listing by pasting in

http://www.url.com/coppermine/albums/albumname/
or
http://www.url.com/coppermine/albums/

i'd like to prevent folks from directly accessing those directories (forcing them to use coppermine instead).

possible?  i didn't find anything about this on the forums or in the documentation, but i might not know the right keywords to search for.

thanks for the help!
Title: Re: restrict direct directory access...
Post by: Nibbler on April 17, 2007, 01:10:06 AM
You can do this using .htaccess with this code

Options -Indexes

Put that in your albums directory.
Title: Re: restrict direct directory access...
Post by: SirKeats on April 17, 2007, 06:51:57 PM
sweet.  thanks!!!