• 1-888-289-2246
  • 24x7x365 Presence

How to stop directory browsing in Apache


Sometimes we’ve seen that when we browse a domain, we see the directory contents in the browsing mode which is not good from the perspective of security.

For a particular domain, we can stop this with .htaccess using the directive below:-

——————————

Options -Indexes

——————————

Similarily, if we want to enable the indexing we can use the directive below:-

——————————

Options +Indexes

——————————

That’s it.

]]>


Leave a Reply

Your email address will not be published. Required fields are marked *