<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<!--帝国7.5默认规则 IIS8的rule name不能重复相同-->
<rewrite>
<rules>
<rule name="listinfo">
<match url="^(.*/)*listinfo-(.+?)-(.+?).html\?*(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="{R:1}/e/action/ListInfo/index.php\?classid={R:2}&page={R:3}" />
</rule>
<rule name="showinfo">
<match url="^(.*/)*showinfo-(.+?)-(.+?)-(.+?).html\?*(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="{R:1}/e/action/ShowInfo.php\?classid={R:2}&id={R:3}&page={R:4}" />
</rule>
<rule name="infotype">
<match url="^(.*/)*infotype-(.+?)-(.+?).html\?*(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="{R:1}/e/action/InfoType/index.php\?ttid={R:2}&page={R:3}" />
</rule>
<rule name="tags">
<match url="^(.*/)*tags-(.+?)-(.+?).html\?*(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="{R:1}/e/tags/index.php\?tagname={R:2}&page={R:3}" />
</rule>
<rule name="comment">
<match url="^(.*/)*comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?).html\?*(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="{R:1}/e/pl/index.php\?doaction={R:2}&={R:3}&={R:4}&page={R:5}&myorder={R:6}&tempid={R:7}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
如果出现500错误,按下面的设置。或者取消动态压缩。
----------------------------------------------------------------------------------------------------------------------------------------------------------
基本上,在入站请求中,HTTP_ACCEPT_ENCODING标头被存储到临时标头中,然后在出站重写规则上恢复 .
在链接失效的情况下,这是以下步骤:
通过左窗格中服务器节点上的IIS管理器GUI,导航到URL重写
单击右窗格中的“查看服务器变量”
添加两个允许的服务器变量:
HTTP_ACCEPT_ENCODING
HTTP_X_ORIGINAL_ACCEPT_ENCODING
返回URL重写服务器的选项,单击右窗格中的查看前提条件 . 添加一个新的前置条件(我将其命名为NeedsRestoringAcceptEncoding)
将条件输入设置为,将模式设置为".+"(无引号) .
TAGS : 帝国ecms