| Author |
Message |
ernui
Joined: 01 Oct 2007 Posts: 1
|
Posted: Mon Oct 01, 2007 3:20 pm Post subject: change sequence of index files |
|
|
the system already set index.php, index.html as the default page when a visitor is visiting our websites, but there is a problem
how about if I have both index.html and index.php in same folder, and their names are not changable (other pages are relating to this name)
is that possible i can change which index page become my default page? thanks! |
|
| Back to top |
|
 |
divya CWH Staff
Joined: 24 Jul 2007 Posts: 47
|
Posted: Thu Oct 04, 2007 4:02 am Post subject: |
|
|
Hello,
We can use the "DirectoryIndex" Apache configuration directive to set priority for the default pages as follows.
1. Open (create one if not present) the .htaccess file under the home directory [or the directory on which you wish to set priority]
2. You can use your own custom index files as follows.
DirectoryIndex index.html index.php index.pl
The server will work from left to right, checking to see if each file exists, if none of them exisit it will display a directory listing.
Now when a user access the website www.mydomain.com the webserver first looks for the index.html file, if it is not found there then it looks for index.php and so on.
Regards,
Divya |
|
| Back to top |
|
 |
|