Auto hide files listing in a folder if it does not a index file?

Dr. McKay

Well-known member
Registered
Joined
Nov 26, 2016
Messages
565
Points
28
I want to hide files or folder listing if my folder or publich_html doesn't have an index file. Does any one know how to fix this on any control panels?

hide_index-of.jpg
 

rowebca

New member
Registered
Joined
Nov 4, 2018
Messages
12
Points
3
Use "Indexes" from your cPanel select the folder what you want and click on "No Indexing".
 

NoFrillsCloud

Member
Registered
Joined
Nov 13, 2019
Messages
15
Points
3
You can edit your .htaccess file (or create one if it doesn't exist) and include the following lines:-
Code:
Options -Indexes
This will disable directory listing and it should throw a "Forbidden" error when someone attempt to access that directory.
 
Newer Threads
Latest Threads
Replies
1
Views
15
Replies
0
Views
170
Replies
1
Views
36
Replies
2
Views
80

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top