How to make a folder not index?
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
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 |
|||||
All times are GMT - 8 Hours
|