Need help with IIS server. Won't automatically execute index.php

My website runs on IIS and I have this problem. The server won’t execute automatically the index.php file.

For example, if I type I will get a 404. I have to type to access the site.

I have solved the issue temporarily by creating a index.html file that redirects to the index.php but I would prefer to have the server execute the php file directly.

What version of IIS are you on? Assuming it’s 7, do the following:

  1. Open IIS Manager.
  2. In the lefthand toolbar, expand the server node, then the Sites node beneath it.
  3. Click on the name of your site.
  4. In the main area of the window, under the IIS heading, you’ll see Default Document. Double-click it.
  5. On the righthand side, under Actions, click Add.
  6. Type “index.php” (without the quotes) into the popup and click OK.

That should do it. You might need to restart the site for this to take effect, not sure. If you do, just click the site’s name again on the lefthand dropdown, then on the right (under Manage Web Site), click Restart.

Ok, had to check an old laptop for IIS 5.1 and 6, so here are those instructions if necessary :slight_smile:

  1. Click Start > Run, type inetmgr, and click OK
  2. In the lefthand toolbar, expand the server node, then the Web Sites beneath it
  3. Right-click the name of your site, and select Properties
  4. Click the Documents tab at the top.
  5. Make sure “Enable default content page” is checked, then click the Add button under it.
  6. Type “index.php” (without quotes) into the popup and click OK.

If you need to restart the site, right-click the name of the site in the lefthand treeview, and click Stop. Then do the same and click Start.

Problem is that I don’t have direct access to the server. All I have is the Plesk Panel

Ah. Ok, from the Plesk admin panel:

  1. Click Domains on the lefthand sidebar.
  2. Click the name of the domain you’re working with.
  3. Under Files, click Virtual Directories.
  4. At the top, click Directory Properties.
  5. Under Documents, type “index.php” (no quotes) in the “Default documents search order” box.
  6. Click Add.

Thank you, I found it! But it is strange, because index.php is already there, although not at the top of the list. I will move it to the top and try again.

Next time give the pertinent information in the first post, so poor Roland doesn’t have to chase around 3 different systems to give you directions. :slight_smile: