简体   繁体   中英

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.

  • Firewall server running Microsoft Forefront TMG 2010
  • SBS 2011 server running DNS
  • Server 2008 R2 running IIS 7.5 wich hosts my webpage.

-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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM