Loading...

Knowledge Base
Categories:

The DirectoryIndex directive sets the list of resources to look for

Share

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?

 
* Your feedback is too short

Loading...