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-
How can I prevent them from showing like this ?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityWhen 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-
How can I prevent them from showing like this ?
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.
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
If you are not aware of server you can simply place index.php with Access Denied echo Error message.
Create an .htaccess file in the target folder with the following content:
Order deny,allow
Deny from all