Forum Moderators: phranque

Message Too Old, No Replies

Help with permissions

On image files

         

Fryman

10:19 am on Mar 4, 2004 (gmt 0)

10+ Year Member



I have a gallery of icons I am displaying at a page on my website.

For example, one icons is called cat.gif, and is hosted on my images folder.

So, if you click on that icon, you can see that the path to it is for example

www.example.com/images/cat.gif.

How do I deny access to my folder to a user that types in the URL bar
www.example.com/images?

AsleepATheWheel

11:45 am on Mar 4, 2004 (gmt 0)

10+ Year Member



Hi Fryman,

Well an easy way is just to put a blank index.htm page in the images folder, it will be called whenever anyone types in www.example.com/images.

Paul

isitreal

4:11 pm on Mar 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That method won't work unless that folder already has web server configuration that tells it to look for index.html as the default, those assignments are only done by default on the site root folder.

If you have apache web server you can add this line to your .htaccess file:

IndexIgnore *

Save the file as .htaccess, then upload it, make sure you make a linebreak after the last item on the .htaccess file, upload it in ASCII mode, not binary, and none of the folders on your site can be viewed.

Fryman

7:40 pm on Mar 6, 2004 (gmt 0)

10+ Year Member



Thanks a lot, I just created a fake 404 error page and loaded it as an index page in several folders.