嚣张研究站呀 · 2021年1月6日 0

web.config设置http跳转https


<rewrite>             

<rules>                 <rule name=”http redirect to https” stopProcessing=”true”>                     <match url=”(.*)” />                     <conditions>                         <add input=”{HTTPS}” pattern=”^OFF$” />                         <add input=”{HTTPS_HOST}” pattern=”^(localhost)” negate=”true” />                     </conditions>                     <action type=”Redirect” url=”https://{HTTP_HOST}/{R:1}” />                 </rule>             </rules>         </rewrite>