1
目前我将所有的http请求重定向到HTTPS,但现在我想添加如果URL包含'admin'然后将HTTP请求重定向到HTTPS的条件,我如何更改规则以实现此目的例如http://www.example.com/admin/index.html)?Conditoinal HTTP重定向IIS 7
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}{REQUEST_URI}" />
</rule>
其工作, 另一个问题:如何在此规则中添加任何其他术语,例如如果在URL中找到'admin'或'profile',重定向会起作用吗? – xtremist