TUTORIAL Disable directory listing on website

pizzabreak

Well-known member
Joined
Jun 26, 2021
Messages
62
Awards
3
Offline
Let's say you have a website called www.website.com
You create a new folder on your website called "Folder"
If you do not have a index.html or index.php file in this "Folder" all users that visit www.website.com/Folder will be able to see all the files and folders inside of that directory.
This is not good if you do not want your files exposed for everyone to see.
The below code shows you how to disable directory listings.

htaccess - no directory browsing.JPG



Hope this helps someone :)
 
Last edited:

Poncho

Owner
Staff member
Admin
Joined
Apr 5, 2021
Messages
1,732
Awards
5
Offline
I like to take the index.php from the api folder of almost any panel and upload that to any folder i wish to restrict
This way it relays the snoopers details back to them, a nice deterrent ;)
 

pizzabreak

Well-known member
Joined
Jun 26, 2021
Messages
62
Awards
3
Offline
I like to take the index.php from the api folder of almost any panel and upload that to any folder i wish to restrict
This way it relays the snoopers details back to them, a nice deterrent ;)
That is a very good approach as well
 
Top