Loading...

Knowledge Base

The DirectoryIndex directive sets the list of resources to look for

Did you find this article helpful?
Copy Link

 
* Your feedback is too short
Share this article

Log into the domain you want to change the default file on (Use the File Manager in cPanel or via SSH). Locate the .htaccess file and add this line at the top:

DirectoryIndex <filename.extension>

Example
DirectoryIndex index.html

Then a request for http://myserver/docs/ would return http://myserver/docs/index.html if it exists, or would list the directory if it did not.

This is now your default file.

More info on this directive can be found on the Apache Documentation page.

Did you find this article helpful?
Copy Link

 
* Your feedback is too short

Loading...