Forum Moderators: phranque

Message Too Old, No Replies

index.htm priority

         

okephoto

6:00 pm on Dec 16, 2007 (gmt 0)

10+ Year Member



I have a web site with both an index.htm and index.php page. The index.php page takes priority when you type in my domain name, is there a way to make the index.htm page the main page?

coopster

9:31 pm on Dec 16, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Remove the index.php page :)

encyclo

9:38 pm on Dec 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It depends on your web server - if you are using Apache, then you change the
DirectoryIndex
in your root-level .htaccess:

DirectoryIndex index.htm index.php

The above gives priority to index.htm, with index.php served only if the former is absent.

coopster

9:41 pm on Dec 16, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Aw, c'mon, I really wasn't trying to be a jerk and I was going to offer the Apache answer ... but I was fishing for the "why I need to do both" response first ;)

okephoto

2:49 am on Dec 17, 2007 (gmt 0)

10+ Year Member



Thanks, the htaccess will work.

I require both as the main page of my site is index.htm and my portfolio databases latest update requires the index.php page. The previous version I could just remove the index.php page and the program would still work.