0

When I visit URL of my Magento store like http://www.example.com/skin/frontend/default/ then it shows all sub-folder listings on browser like shown in below image-

enter image description here

How can I prevent them from showing like this ?

3 Answers 3

2

This comes from your webserver configuration. If you are using Apache, directory listing is enabled with Options Indexes, for nginx it is autoindex on. You have to remove this from the virtual host configuration, or use Options -Indexes/autoindex off to turn directory listing off explicitly.

If you don't know where to find this configuration, ask your admin/hoster, it depends on the system.

2
  • Is it possible to achieve my GOAL using .htaccess? By doing some changes in it. Mar 4, 2016 at 13:45
  • A .htaccess file with Options -Indexes could work, but it depends on the `AllowOverride´ setting, if you actually can override it in .htaccess Mar 4, 2016 at 13:46
0

If you are not aware of server you can simply place index.php with Access Denied echo Error message.

2
  • This is not really a full answer, more like a comment. It does not include how to implement this.
    – 7ochem
    Mar 4, 2016 at 13:49
  • Implementation is too simple just place index.php file that contains echo "Access Denied"; Mar 5, 2016 at 9:30
0

Create an .htaccess file in the target folder with the following content:

Order deny,allow
Deny from all

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.