Is it possible to hide the folders in my root folder? Just in case my index.php would disappear you know?
Could I also show 404 error not found if someone requests them?
Is it possible to hide the folders in my root folder? Just in case my index.php would disappear you know?
Could I also show 404 error not found if someone requests them?
IndexIgnore *
The above would prevent all files from being listed. Here *
acts as a wildcard. You could replace it with something more specific, if needed.
What you want is probably
Options -Indexes
which will just give a 404 error if no DirectoryIndex file is found.
As mentioned by duskwuff, what you need is
Options - Indexes
This will cause a 403 forbidden error on that particular directory. Thus to provide a custom error page you will need
ErrorDocument 403 myErrorPage.html
Hope this helps