Your hosting can make or break your site. Choosing the right host will undoubtedly determine your fate. Here you\'ll learn how it\' done.  Home Site Maintenance Hosting Services Change Default Directory Page
Your Ad Here

Change Default Directory Page


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.



Author's URL: Depiction.net
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Read about the most important web services: web promotion, domain registration and website hosting. All web developers need this website maintenance stuff. More Site Maintenance: Most Popular Materials | Fresh Materials | Website Templates

Add comments to "Change Default Directory Page"

Only registered users can write comment

Reader's comments