Code language: HTML, XML (xml)Options +Indexes # or # IndexIgnore *
Following is the error page that gets displayed when we try to access any directory without index file.Code language: HTML, XML (xml)Options -Indexes
Code language: HTML, XML (xml)IndexOptions +FancyIndexing
Code language: HTML, XML (xml)IndexOptions -FancyIndexing
Code language: HTML, XML (xml)IndexIgnore *.zip *.txt
Code language: HTML, XML (xml)DirectoryIndex Home.html
Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…
Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…
Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…
1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…
GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…
1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…
View Comments
this is really helpful details
Is there a way to disable all browsing all directories except one?
For example, after applying "Options -Indexes", can I create a rule to list items inside the '/pdf' folder?
Thanks.
Hi Ricardo,
There is a way to achieve this. If you want to disable directory listing in a folder and all its subfolders except one subfolder say /pdf. You have to create .htaccess file in root folder and the code to disable directory access:
Options -Indexes
. And then create another .htaccess file in the subfolder /pdf and add code to allow directory listing in it:Options +Indexes
.Awesome! It worked perfectly!
Thanks Viral!
Thanks Viral, I was looking for a solution for what Ricardo asked, and yours worked perfectly. Thanks! :)
The IndexIgnore * line seems to cause the whole thing not to work. This line tells the server to ignore all files in the directory listing. When I took out that line, I was able to see the directory properly.
Thanks!
Great! thanks!
Nice mate.. :)
That's very good information.
But, is there a way to set these listing permissions per directory, instead of document root?
Thanks..
Vas
OK, I see the answer above.. :)
When I took out that line, I was able to see the directory properly.
I have a problem in directory listing in http://3idiots.mobi/Downloads/ it doesn't show a single file in the folder. I have updated .htaccess file and pasted Options +Indexes. then also it is showing blank page. What should i have to do.