multisite - Configure redirects with web.config

I have a WP multisite that created the following web.config files at bottom ( works perfectly ). However, how do I creat

I have a WP multisite that created the following web.config files at bottom ( works perfectly ). However, how do I create 301 redirects for individual pages in the subsites?

** WP generated web.config

<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="WordPress Rule 1" stopProcessing="true">
                    <match url="^index\.php$" ignoreCase="false" />
                    <action type="None" />
                </rule>
                <rule name="WordPress Rule 2" stopProcessing="true">
                    <match url="^wp-admin$" ignoreCase="false" />
                    <action type="Redirect" url="wp-admin/" redirectType="Permanent" />
                </rule>
                <rule name="WordPress Rule 3" stopProcessing="true">
                    <match url="^" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAny">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
                    </conditions>
                    <action type="None" />
                </rule>
                <rule name="WordPress Rule 4" stopProcessing="true">
                    <match url="^(wp-(content|admin|includes).*)" ignoreCase="false" />
                    <action type="Rewrite" url="{R:1}" />
                </rule>
                <rule name="WordPress Rule 5" stopProcessing="true">
                    <match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
                    <action type="Rewrite" url="{R:2}" />
                </rule>
                <rule name="WordPress Rule 6" stopProcessing="true">
                    <match url="." ignoreCase="false" />
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>

    </system.webServer>
</configuration>

I want the page to go to ?

I've read this blog and it says I should be able to generate something like the snippet below it will crash the multisite:

 <location path="/resources/a-story">
    <system.webServer>
      <httpRedirect enabled="true" destination="//resources/a-story" httpResponseStatus="Permanent" />
    </system.webServer>
  </location>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745634433a4637301.html

相关推荐

  • multisite - Configure redirects with web.config

    I have a WP multisite that created the following web.config files at bottom ( works perfectly ). However, how do I creat

    22天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信