ninety-seven
IIS7 and IIS8 automatically jump to HTTPS

Install the "URL REWRITE2" pseudo static module

IIS7 needs to confirm whether to install the "URL REWRITE2" pseudo static module. If you have already installed it, you can skip

Download address:

Select Site

URL rewriting. If the English version is installed, it should be [Url rewrite]

Add Blank Rule

Add Rule

Name: HTTPS

Match URL pattern: (. *)

Add condition: Condition: {HTTPS} Mode: off

Operation type selection: Redirect

Redirect URL: //{HTTP_HOST}/{R:1}

Then save it

Advanced Edition

Add pseudo static to web.config directly

 <?@ xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="//{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Does this help solve your problem? resolved Unresolved

Submitted successfully! Thank you very much for your feedback, and we will continue to strive to do better! We are sorry that we were unable to resolve your question. We have received your feedback and will give feedback in time!