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 ?

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.

| improve this answer | |
  • Is it possible to achieve my GOAL using .htaccess? By doing some changes in it. – Shashank Kumrawat Mar 4 '16 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 – Fabian Schmengler Mar 4 '16 at 13:46
0

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

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

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

Order deny,allow
Deny from all
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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