Search code examples
phphtmlwebserverphp-5.3

change security permission in a website


I have a website that is working properly.I dont know when I do "Domain-name.com/images" It shows me all the images in the images folder present at my site.I dont know why is this.may be this is due to the Directory permissions?But I want to ask know the actual reason behind it Help will be appreciated. Note:I am tagging Php and Html because these people might faced this thing while creating website.


Solution

  • This is because there is no index file in the folder, and Apache (assuming Apache) is set to do directory indexes.

    Either create an empty index.html or add the following in either apache2.conf (or httpd.conf) or in a htaccess file:

    Options -Indexes