IIS Url重写Wordpress子文件夹站点


IIS Url Rewrite for Wordpress subfolder site

我运行两个独立的Wordpress实例,一个在根文件夹中,一个在子文件夹中。这些Wordpress实例运行在IIS上。

我得到的永久链接工作的根wordpress实例。但是它在子文件夹下的wordpress上不起作用

我正在尝试使用单独的web。使用此规则集在子文件夹中配置。但它不会正常工作。会出什么问题呢?

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <httpErrors errorMode="Detailed" />
    <rewrite>
      <rules>
        <rule name="90-Numre" 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="^90-numre/index.php/{R:0}" /></rule>
            <rule name="wordpress1" 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="^90-numre'index.php" />
        </rule>     
        </rules>
    </rewrite>
    <defaultDocument>
      <files>
        <clear />
        <add value="index.php" />
      </files>
    </defaultDocument>
  </system.webServer>
    <system.web>
        <customErrors defaultRedirect="" mode="RemoteOnly" />
    </system.web>
</configuration>

感谢:MVC3 + WordPress IIS Url重写规则

我发现了诀窍:

<rewrite>
    <rules>
        <rule name="wordpress" patternSyntax="Wildcard">
            <match url="*" />
            <conditions logicalGrouping="MatchAll">
                <add input="{PATH_INFO}" pattern="/mymvcapp/*" negate="true" />
                <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>