2013-12-21 59 views
0

我想解決與我的WP安裝問題。我在服務器上安裝了3個WP,如下所示。IIS Url重寫不能與嵌套的WP安裝工作

  • 根(WordPress的)
    • /樣式(WordPress的)
    • /公告(WordPress的)

該一個在根是工作,但其他被投擲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> 

風格 - 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

你看到日誌文件(S)什麼? –

+0

添加了日誌錯誤問題。 – devfunkd

回答

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> 

子目錄1個& 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>