|
4 Notices
|
KB Home >
.htaccess
>
Change the default index page of a directory or site
|
Change the default index page of a directory or site To change the default index page’s name for a directory or the site, place the following line in the .htaccess file of the root folder or the particular directory for which you want to change the index page’s name. DirectoryIndex homepage.htm DirectoryIndex somepage.htm To have more names, put a space between file names and it will take into considerations all those file names as possible index page names. Which means, if it finds a filename matching a list of names you supplied [in the given order] in .htaccess, then it will open that page as the index page for the directory. The below line, with multiple names, is also a valid usage: DirectoryIndex homapage.html somepage.html myindexpage.html anything.html *Remember, each entry must be in one line only.* |
Mail |
Print| Additional Info |
![]() |