当前位置:首页 -少年百科 - 大杂烩 - 正文*

IIS URL重写中有个别网址不跳转的问题

2022-1-6 17:57:33

网站内容使用IIS7.5 ,通过NGINX 负责多站点的HTTPS(443端口)。
在IIS中使用URL重写实现HTTP 跳 HTTPS
<rule name="http重定向为https" enabled="true" stopProcessing="true">
<match url="(.*)" />
<action type="Redirect" url="https://m.zww.cn/{R:0}" />
<conditions>
<add input="{HTTPS}" matchType="Pattern" pattern="^OFF$" ignoreCase="true" negate="false" />
<add input="{REMOTE_ADDR}" pattern="^61\.183\.11\.168" negate="true" />
</conditions>
</rule>

使用中多数网址是能够正常跳转的,但后来发现有部分网址 不能众HTTP跳到 HTTPS,这些网址没有规律。更换浏览器打开这些网址也不行。网上没有找类似的解决办法。

后来,发现IIS7.5上的URLreWrite 是英文版,更换为 URLreWrite中文版后,网址跳转正常。