2015-10-15 85 views
0

我想将我的登录页面重定向到https,但我不明白为什么我的规则不起作用,有人有想法?Web.config URL重写器

<rewrite> 
      <rules> 
       <clear /> 
       <rule name="Redirect to https" stopProcessing="true"> 
        <match url="http://([_0-9a-zA-Z-]+).<mydomaine>.fr(/logon.html)?" /> 
        <conditions> 
         <add input="{HTTPS}" pattern="off" ignoreCase="true" /> 
        </conditions> 
        <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" /> 
       </rule> 
      </rules> 
</rewrite> 

当我的网址导航,而不https协议的规则不执行重定向

+0

一切看起来都对我很好,你确定了比赛的网址是OK ? –

+0

当您使用

+0

@DylanSlabbinck进行尝试时会发生什么情况。 – tdelepine

回答

0

的良好匹配是:([_0-9a-zA-Z-]+)(.<mydomaine>.fr)(/logon.html)?