Htaccess Change the Default Directory Page DirectoryIndex

There are a number of command you can use through htaccess file to change the default directory page of your website. If you want to change the default of your website’s html file , you can simply create the .htaccess file , and then use the command line;

DirectoryIndex index.html

You can even make your default directory page load a movie at default by using the command line:


You can also specify multiple files when you change the default directory page by adding the extension of the files to DirectoryIndex. In case the server cannot find the default directory page you specify, it will simply revert to a directory listing within the htaccess file in the folder created. There is no limit to the number of times you can change your default directory page, however , you may need to clear your browser cache sometimes before changing the default directory page.

  1. No comments yet!, be the first to post a comment.

Your email will not be published, The required fields marked with '*'