伪静态web.config文件里面怎么添加多个网站的伪静态规则

我想在主站根目录下面分一个文件夹做一个站内站,请问站内站的伪静态规则怎么统一写入主站根目录的web.config里面

这是主站的伪静态规则如下↓

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

<system.webServer>

<rewrite>

<rules>

<rule name="TWCMS Rule /" stopProcessing="true">

<match url="(.+)" ignoreCase="false" />

<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?rewrite={R:1}" />

</rule>

                <rule name="301Redirect" stopProcessing="true">

                    <match url="(.*)" />

                    <conditions logicalGrouping="MatchAny">

                        <add input="{HTTP_HOST}" pattern="^chlnapulp\.com$" />

                    </conditions>

                    <action type="Redirect" url="http://www.chlnapulp.com/{R:0}" redirectType="Permanent" />

                </rule>

               

</rules>

</rewrite>

</system.webServer>

</configuration>

========这是站内站zbog的伪静态规则================

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

 <system.webServer>

  <rewrite>

   <rules>

<rule name="/thwp1/ Z-BlogPHP Imported Rule" stopProcessing="true">

 <match url="^.*?" ignoreCase="false" />

  <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/{R:0}" />

</rule>

<rule name="/thwp1/ Z-BlogPHP Imported Rule index.php" stopProcessing="true">

 <match url="^index.php/.*?" ignoreCase="false" />

  <conditions logicalGrouping="MatchAll">

   <add input="{REQUEST_FILENAME}" matchType="IsFile" />

  </conditions>

 <action type="Rewrite" url="index.php/{R:0}" />

</rule>

   </rules>

  </rewrite>

 </system.webServer>

</configuration>

麻烦同学们指点一下,感激不尽

追加问题
分享到微信 收藏
    1 人参与回答
1 个不友善的回答被折叠