: Deny access to directory content on shared hosting service My Website is hosted on a shared Apache server. How can I deny access to directory content pages so if someone goes to the address
My Website is hosted on a shared Apache server. How can I deny access to directory content pages so if someone goes to the address mywebsite.com/directory they don't see the following:
Index of /directory
Parent Directory
mycontent/
moreofmycontent/
More posts by @Goswami781
1 Comments
Sorted by latest first Latest Oldest Best
There are two common ways to prevent directory listing under Apache:
Create or edit the file called .htaccess in your web server's root directory and add the line:
Options -Indexes
Put blank index.html files in each subdirectory.
The first option is probably the best, unless you're distributing open source projects (like WordPress), when it's a good idea to use the blank index.html method to make sure subdirectories won't be listed by default for other people who download your project as well.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.