【发布时间】:2018-03-15 09:15:22
【问题描述】:
需要将每个非 www 命中重定向到 www url,为此我有以下规则
<rule name="WWW" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^domain\.com$" />
</conditions>
<action type="Redirect" url="http://www.{HTTP_HOST}/{R:1}" />
</rule>
现在做什么 - 它将非 www url 的每一次点击重定向到我的主页 (www.domain.com) 预期 - 它应该将 domain.com/subpage 重定向到 www.domain.com/subpage
【问题讨论】:
-
您的网站使用 ssl 吗?
-
不,我们没有使用 ssl
标签: asp.net redirect iis url-redirection url-rewrite-module