I created a assets
directory to put the assets of my project.
So far so good, however, I have found that by typing in the URL localhost/project/assets
, it shows the directory structure of that folder. In order to prevent this action, I created a .htaccess
file in the assets
directory:
Deny from all
Creating .htaccess
in the above prevented directory view, but caused an error: no files, either CSS or JavaScript are loaded from this folder.
So, my question is:
Is there a way to hide only the directories , leaving yet their files for my own application?