【问题标题】:How to run specific pages on https如何在 https 上运行特定页面
【发布时间】:2012-07-19 18:26:08
【问题描述】:

我使用了一个规则将页面重定向到https。以下是web.config中的规则:

  <rules>

      <rule name="HTTPs Redirect" stopProcessing="true">
        <match url="(.*)" />
        <conditions>
          <add input="{ALL_HTTP}" matchType="Pattern"
               pattern="HTTP_X_FORWARDED_PROTO:https" ignoreCase="true" negate="true" />            
        </conditions>
        <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
      </rule>
  </rewrite>

此规则将所有页面重定向到 https,但我想重定向我的应用程序的某些页面,例如如果我有两个页面 test.aspx 和 test1.aspx,那么我想将 test.aspx 重定向到 https 并将 test1.aspx 重定向到http。 怎么可能。

谢谢

【问题讨论】:

    标签: asp.net appharbor


    【解决方案1】:

    您可以详细说明您在 match 元素 (details) 中已有的 url 正则表达式,也可以添加 additional conditions。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-02-25
      • 2014-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多