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
0
Views
42
Replies
0
Views
30
Replies
0
Views
168
Replies
0
Views
74
Replies
0
Views
68
Recommended Threads
Replies
25
Views
10,100
Replies
9
Views
12,157
Replies
7
Views
5,308

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