Knowledgebase

How to disable the directory listing?

How to disable the directory listing?

Follow the below steps to disable the directory listing. 

Step 1: Initially, open your "public_html folder or home folder". 

Step 2: Then check for the file ".htaccess". If it is not available, then create a .htaccess file. In case the .htaccess file is available, then open it. 

Step 3: Now search for below mentioned lines in the last portion of the .htaccess file. 

Options Indexes 

Step 4: Then modify that last line as 

Options -Indexes 

Note that if you have .htaccess file recently then just add the lines "Options -Indexes" in last portion of the .htaccess file.
  • 0 Users Found This Useful
Was this answer helpful?