PandaNL
PandaNL

Reputation: 848

IIS 7.5 domain won't show index.php

Have been trying to fix this problem the whole day but nothing seems to work.

The problem: Server 2008 R2 running IIS 7.5 with my website. Bindings of this site are set to www.mydomain.com port 80 host * and another binding for www-mydomain-com port 80 host * (Site name in IIS is www-mydomain-com)

When going to www.mydomain.com it shows me the IIS welcome page instead of the index.php. The index.php is the only document in my default document settings. However when browsing to www.mydomain.com/index.php I get the correct page. Browsing to www.mydomain.com/somefolder/ also redirects me to the index.php in the somefolder so this works.

The default site in IIS is stopped and it doesn't has any bindings. Also tried to add empty hostname port 80 to the www-mydomain-com site but this also won't give the correct page.

The situation.

-DNS has the following cname record www-mydomain-com pointing to fqdn webserver

-Firewall rule in forefront is set to any incoming going to www-mydomain-com, forefront runs to the test and can connect to www.mydomain.com on port 80

Hopefully someone can help me to find the problem, been stuck all day.

Upvotes: 1

Views: 550

Answers (2)

PandaNL
PandaNL

Reputation: 848

Finally found the problem, changed the index.php require_once('includes/config.inc.php'); to require_once('/includes/config.inc.php'); and it works like it should.

Upvotes: 1

Avi Gurfinkel
Avi Gurfinkel

Reputation: 69

Try changing the settings from the IIS Manager, run:

%windir%\system32\inetsrv\InetMgr.exe

You can expand the Sites folder find your web site and in the feature view select Default Document, where you can configure what will be the default pages loaded for each folder enrty and set their priority

Upvotes: -1

Related Questions