Depiction- Webmaster Resources
Stock Image


Contributors: Advertise Here  |  Advertise Here  |  Advertise Here


Misc Links: Submit Tutorials (Earn $$) l Advertising l Privacy Policy | Site Map

Tutorials > .htaccess > Change Default Directory Page

 

Change a directory's default directory page to a page you specify.


A directory's default page is usually index.html, index.htm, or index.php. Therefore, when a visitors goes to www.domain.com they are automatically redirected to www.domain.com/index.html.

With .htaccess the default directory page can be changed.


Open your .htaccess file or create a new one. (Please see the .htaccess tutorial to learn how to make one.) Add the following to the next available line. (You can change filename.html to any page you'd like to use.)

DirectoryIndex filename.html

(The above code would cause filename.html to be the default page of your site, so http://www.domain.com would not go to index.html, but to filename.html)

Finally, save the .htaccess file and upload it to the directory you would like to affect. Remember that it will affect all sub folders.


 
 

Affiliates

Templora Photoshop Tutorials
Tutorial Man Wallpaper Stock  More

Resources