简体   繁体   中英

Web.config URL rewriter

I would like to redirect my logon page to https, but i don't understand why my rules doesn't work, somebody have idea ?

<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>

when i navigate on the url without https protocol the rule doesn't execute redirect

最佳搭配是: ([_0-9a-zA-Z-]+)(.<mydomaine>.fr)(/logon.html)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM