Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Found that IIS was looking for iistart.htm before looking for index.php!


I am building an application on a iis 6 server and I am running into a problem. When I type in http://server/index.php, I find my page fine. If I remove the index.php I lose the page. It is directly on my root, and I am accessing my root with http://server/.

I originally thought I had messed up with the web directories in the iis settings, but I tested it on a folder one directory deep, example: http://server/folder. This brought up the index.php webpage in that browser and I didn't need to add index.php at the end.

Can anyone explain why this is happening?

share|improve this question

migrated from stackoverflow.com Jun 16 '11 at 3:01

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 2 down vote accepted

You simply need to configure IIS to use index.php as a directory index page, and raise it in the order of priorities. It seems you have another index.html file, and index.html is probably farther up on the list than index.php.

  1. IIS Manager->Web Sites
  2. Right-click your site and hit properties
  3. Documents Tab
  4. Click index.php and move it to the top of the list.
share|improve this answer
    
But when I place index.php in a directory below, it reads the index.php first thing. Example: http://server/folder picks up the index.php –  Phil Jun 16 '11 at 13:13
1  
@Phil, you can set these settings differently for each directory. If you set them on the root site, it will prompt you to overwrite any sub-directory settings that are different. –  Brad Jun 16 '11 at 13:27
    
Ahh, okay, let me try that out. –  Phil Jun 16 '11 at 14:37
    
That worked! Yay! Thank you very much. Apparently it was reading iisstart.html before the index.php! –  Phil Jun 16 '11 at 14:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.