Site Maintenance  Home Site Maintenance Hosting Services Change Default Directory Page
rss

Change Default Directory Page

Author: Depiction.net More by this author
Browse Pages: << <  5  6  7  8  9


Image from Hosting Services: Change Default Directory Page

A directory's defauly 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.



print this page tell a friend subscribe to newsletter subscribe to rss
Rate this Material: Bad 1 2 3 4 5 Excellent
Browse Pages: << <  5  6  7  8  9

Add comments to "Change Default Directory Page"