Magento – How to prevent access of web folder from browser in magento

magento-1.9redirection

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 ?

Best Answer

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.

Related Topic