General

ID #1292

Can I specify a different default index page for a directory or subdirectory without renaming it index.html etc.?

Yes, but only if you are NOT using FrontPage to work with or publish your site. If you wish to use an alternate file name as a default index page, this can be done by adding the following directive to an .htaccess file stored either in your public_html directory (if you wish the directive to be in effect for your first-level site files) or in a specific folder (if you wish the directive to be in effect for a specific subdirectory in your web site):

DirectoryIndex filename.ext

where filename.ext is the actual filename of the new default index page.
For example if you wish the default index page for your web site to be "mypage.php" you would place an .htaccess file in the public_html folder containing the following line:

DirectoryIndex mypage.php

IMPORTANT: If there is already an .htaccess file in the directory, just edit it to add the new directive line. If you replace an existing .htaccess with a new/different one, you may overwrite important information already in use by your web site.

Tags: -

Related entries:

Last update: 2007-01-03 02:58
Author: Philhosting
Revision: 1.0

Digg it! Print this record Send to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this entry:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry