[英]URL Rewrite from https to http for one page
我需要为单个页面执行URL重定向。 如果客户访问https://example.com/default.aspx,我需要发送到http://example.com/default.aspx ,到目前为止收效甚微。 任何人都可以阐明限制该页面定向的最佳方法吗?
目前我正在工作,但是导致我想要成为https的页面的重定向循环。
<rule name="ForceNonHttps" stopProcessing="true">
<match url="(.*)default/(.*)" ignoreCase="true" negate="true" />
<conditions>
<add input="{SERVER_PORT}" pattern="^443$" />
</conditions>
<action type="Redirect" redirectType="Found" url="http://{HTTP_HOST}{REQUEST_URI}" />
</rule>
下面的重写规则对我很有用!
<rule name="default.aspx HTTPS to HTTP" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAny">
<add input="{URL}" pattern="https://example.com/default.aspx$" />
</conditions>
<action type="Redirect" appendQueryString="false" url="http://example.com/default.aspx" redirectType="Permanent" />
</rule>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.