Jump to content

How to stop people from access to picture directory


batman4ever

Recommended Posts

Posted

Hi

I'm working on my website now, and I create a file folder to store all the images for the website.

For example : www.mysite.com/image (this is where  I store all images.)

My question is how to I stop people to access to that directory, but still able to get to images links (www.mysite.com/image/pic1

Is there a way to do it in cpanel?

Sorry I'm a newbie in all this web things

  • Andr-Tech
Posted

Turn off indexing on your site. From cPanel, the Advanced section, then Index Manager. You can turn it off for your entire site by clicking public_html, then choosing "No Index."

There's generally no reason for anyone to be able to get a list of the files in any of your folders, so turning off indexing for the whole site is usually a good idea. It prevents unauthorized "browsing."

  • Like 3
Posted

Thank you uk666, it works perfectly. Now I can stop unauthorized access to that directory.

 

  • Like 1
Posted (edited)

You can also create a blank .htm file and put it in that directory. This will not allow them to actually see all the content/files/directories that you may have. Thats what I do to my 4images website I use

Edited by datakore
  • Like 1
×
×
  • Create New...