How to make a folder not index?
ktoz
Status: New User - Welcome
Joined: 09 Oct 2003
Posts: 4
Reply Quote
I have a gallery of images I am displaying at a page on my website.

For example, one image is called image_01.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/image_01.gif.

How do I deny access to my folder to a user that types in the URL bar
www.example.com/images?
Back to top
Use Apache's .htaccess file
Erik Johnson
Status: Interested
Joined: 26 Sep 2003
Posts: 17
Reply Quote
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.

Usually .htaccess files are located on your website root directory, download it, then make the above change in your html editor (don't use notepad, it doesn't like saving things with strange extensions like .htaccess
Back to top
Display posts from previous:   

All times are GMT - 8 Hours