Navigate
Sponsors
|
Changing the Default Directory PageIntroduction::This guide shows you how to change your default directory page with the DirectoryIndex command. So what's a default directory page? When a URL or directory is requested a default page is loaded. For example if you go to http://ssi-developer.net/ it will serve up the default page which is index.shtml because my default page is index.htm, .html or .shtml. Using the DirectoryIndex command allows you to change your default page to anything you wish like "thisismydefaultpage.htm" DirectoryIndexPlace the following in your .htaccess file: DirectoryIndex default.htm ...where default.htm is obviously the default name you want. If you also want certain scripts to run as default you can add other filenames to this: DirectoryIndex default.htm home.cgi sadass.pl otherfile.html What happens here is; if the URL in question is requested the server will look for default.htm and load it. If it does not find this page it will look for the next one home.cgi and if it finds it will load it, if it does not find this file it will search for the next in the list and so on. Very simple, yah? |