我正在尝试解决WP安装的问题。我在服务器上安装了3个WP,如下所示。
根处的工作正在运行,但其他人正在抛出500错误。他们最近工作但不确定发生了什么。
我认为可能是配置和重写规则?
ROOT - WebConfig
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule></rules>
</rewrite>
</system.webServer>
</configuration>
STYLE - WebConfig
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules><rule name="Imported Rule 1" stopProcessing="true"><match url="^index\.php$" ignoreCase="false" /><action type="None" /></rule><rule name="Imported Rule 2" stopProcessing="true"><match url="." ignoreCase="false" /><conditions logicalGrouping="MatchAll"><add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /></conditions><action type="Rewrite" url="/index.php" /></rule>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
<Clear/>
</rewrite>
</system.webServer>
</configuration>
ISS错误日志(为安全而删除了IP和网站网址)
#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2013-12-21 17:43:52
#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
2013-12-21 17:43:52 W3SVC9 AWKS 888.888.888.88 GET / - 443 - 88.888.88.888 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/31.0.1650.63+Safari/537.36 Comm100_CC_Identity_180737=-59;+comm100_session_180737=-73 - www.website.com 301 0 0 437 439 343
答案 0 :(得分:0)
知道了。如果其他人遇到嵌套WP安装问题,我就是这样做的。
ROOTDIRECTORY - WEBCONFIG
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(SUBDIRECTORY1|SUBDIRECTORY2)" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
SUBDIRECTORY 1&amp; 2 - WEBCONFIG
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="SubSite Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>