使用的赞誉.urlrewrite用于http到https的重定向,反之亦然



是否有人尝试使用Intelligencia.UrlRewriter的http到https,反之亦然的页面重定向。我似乎不能使它在我的网站上工作。虽然我可以在http页面之间使用重写。

这似乎对我有用,在web.config:

<rewriter>
  <if header="HTTPS" match="^OFF$">
    <redirect url="(.*)" to="https://mydomain$1" />
  </if>
</rewriter>

虽然我发现IIS和MVC,至少,设置[RequireHttps]将自动处理http -> https重定向与302。

最新更新