Iis 子目录的web.config rewrite index.php

Iis 子目录的web.config rewrite index.php,iis,web-config,rewrite,Iis,Web Config,Rewrite,服务器上有两个webapps,一个wordpress网站和一个子目录中的“独立”网站 这两个应用程序都需要重写index.php,而对于wordpress,这是自动完成的,但现在我还需要重写子目录中的另一个应用程序 进一步澄清: 应该重定向到 应该重定向到 这似乎是一件相当简单的事情,但我似乎无法理解 这是我现在拥有的web.config,我如何修复它 <?xml version="1.0" encoding="UTF-8"?> <configuration> &

服务器上有两个webapps,一个wordpress网站和一个子目录中的“独立”网站

这两个应用程序都需要重写index.php,而对于wordpress,这是自动完成的,但现在我还需要重写子目录中的另一个应用程序

进一步澄清:

应该重定向到 应该重定向到

这似乎是一件相当简单的事情,但我似乎无法理解

这是我现在拥有的web.config,我如何修复它

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <defaultDocument>
            <files>
                <clear/>
                <add value="index.php"/>
                <add value="Default.htm"/>
                <add value="Default.asp"/>
                <add value="index.htm"/>
                <add value="index.html"/>
                <add value="iisstart.htm"/>
                <add value="default.aspx"/>
            </files>
        </defaultDocument>
        <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>
                <rule name="standalone" stopProcessing="true">
                    <match url="^" ignoreCase="false" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php/{R:1}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>