I want to prohibit the list of directory files in all my folders, so when the user types http://example.com/thisDoesNotExists/
, the list of directory files is not displayed.
According to the tutorial, all I need to do is install IndexIgnore *
I try to set it to httpd.conf
, so I do
<IfModule mod_autoindex>
IndexIgnore *
</IfModule>
down below httpd.conf
.
This does not work. I get 404errorPage.html
without any styles.
How can i fix this? Thank.
Disclaimer: I try to set this to httpd.conf
, and not htaccess
because "you should avoid using .htaccess files completely if you have access to the configuration file of the main httpd server. Using .htaccess files slows down your Apache HTTP server Any directive, which you can include in the .htaccess file is better installed in the Directory block, as it will have the same effect with better performance. " According to this .
source
share