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

I have a website running on IIS 7 that has the default document on the Web Site Level set to only index.php. If I right click on the Web Site in IIS Manager and select Explore I see that the index.php file is there. If I just browse to the web site like http://my.site.com I get the default IIS 7 logo with "Welcome" in a bunch of diff languages. If I go to http://my.site.com/index.php it brings up the site just fine. I have stopped and started the Web Site and ran iisreset but still no luck.

The Default Document Section of Web.config looks like this

            <clear />
            <add value="index.php" />

What am I missing?

share|improve this question
you set up IIS to handle PHP? learn.iis.net/page.aspx/246/… –  Malnizzle Feb 7 '11 at 16:05
all the php pages are working fine it's just the default doc that is not working. –  D.K. Mulligan Feb 7 '11 at 16:09
add comment

2 Answers

So you can call the file explicitly but when you just use the default address like it doesn't work? The first I would do is make sure the default document is also set to index.php. IIS7 will not do this even if you correctly set document handlers to recognize php(which it looks like you have if your index.php displays correctly).

Open the IIS7 control panel from the Computer Management panel. On the tab under Connections click Sites, the default web site. In the next panel to your right titled Default Web Site Home scroll down till you see Default Document and click on it. If it doesn't have index.php or whatever you want as your default file name then click on Add under Actions and type in the name you want to use. You may need to restart the service I am not sure. This should solve the problem, if you only want to do this for a single site under IIS then you can click on the individual site in the connections panel, then Default Document.

share|improve this answer
Thanks, but this is exactly how I set it up but it is still not working. –  D.K. Mulligan Feb 7 '11 at 16:28
add comment

Do a test with a page called default.aspx or default.htm and see if they still work as a default doc. If they do, then your hosting provider (I'm making an assumption) may be overriding the default documents.

Also make sure any of your own URL Rewrite rules at the site or global level aren't overriding your default docs.

share|improve this answer
add comment

Your Answer


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.