Change the default document on your PHP site


To change the default document on your PHP-based sites, you can use the following code in the .htaccess file:

DirectoryIndex filename.html

This code causes filename.html to be treated as your default page, or default directory page. You can also add additional file names to it, as shown in the following example:

DirectoryIndex filename.html default.htm home.php home.html


Was this content helpful?




© 2015 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER