问:请教下这个主机web.config怎么设置http 301到https 。百度各种写法都无效。 ,请教下这个主机web.config怎么设置http 301到https 。百度各种写法都无效。
答:您好,请参考https://www.west.cn/faq/list.asp?unid=1419 设置,非常感谢您长期对我司的支持!
问:加了会冲突,请教怎么补充能让 https://xmwpwl.com/跳转到https://www.xmwpwl.com/
<rule name="301" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_FROM_HTTPS}" pattern="^on$" negate="true" />
</conditions>
<action type="Redirect" url="https://www.xmwpwl.com/{R:1}" redirectType="Permanent" />
</rule>
答:您好,单独加一条普通的301规则,跳转到https://www.xmwpwl.com,非常感谢您长期对我司的支持!
<rule name="301Redirect" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^xmwpwl.com$" />
</conditions>
<action type="Redirect" url="https://www.xmwpwl.com/{R:0}" redirectType="Permanent" />
</rule>