What is the best practice to disable directory browsing on an apache2 webserver? I am thinking disabling this at the httpd.conf would restrict browsing even if somebody gained access to the .htaccess file on the webserver and enabled directory browsing? Thoughts?
What is the best practice to disable directory browsing on an apache2 webserver? I
Share
It’s simpler via the server config but htaccess is often the only way. Especially on shared hosting.
If someone manipulates the htaccess file you don’t need to protect your files. In that case it is already too late.