...

View Full Version : home page



Aymen++
05-21-2004, 06:02 PM
if the name of my homepage wasn't index.* (for example www.myweb.com/home.php), how can i inform the server about it?

bcarl314
05-21-2004, 06:07 PM
Depends, what are you using for a web server? Apache? IIS?

Spookster
05-21-2004, 06:11 PM
Assuming you are using Apache webserver....

Well if you are allowed to use .htaccess files you can change the default index page to whatever you want. What you would do is create a .htaccess file and put it in the root folder of your webspace. The commands will apply to all subdirectories as well as the current directory it is placed in.

As for the command to put in the file you simply need this:

DirectoryIndex home.php

You can add more to the list if you need them. For example:

DirectoryIndex home.php index.php index.html home.html foobar.htm

What happens is when a directory is requested by the browser it will go through this list from left to right and look for a matching file in that directory. Now if for some reason you happened to have more than one of those files listed actually in the directory I think the ones listed first have priority. So for example if you had both an home.php and a index.php it would go to home.php since it is listed first in that list.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum