Canadian Webhosting Forums Forum Index Canadian Webhosting Forums
Discussion Forums
 
 FAQFAQ   SearchSearch      RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

change sequence of index files

 
Post new topic   Reply to topic    Canadian Webhosting Forums Forum Index -> General Help
Author Message
ernui



Joined: 01 Oct 2007
Posts: 1

PostPosted: Mon Oct 01, 2007 3:20 pm    Post subject: change sequence of index files Reply with quote

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: 46

PostPosted: Thu Oct 04, 2007 4:02 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Canadian Webhosting Forums Forum Index -> General Help All times are GMT - 8 Hours
Page 1 of 1

 


Hosting Plans :: Flash Tutorials :: Contact Us :: Privacy Policy


Powered by phpBB, MySQL and PHP