These days are busy with their own personal site, encountered a demand, is to send the normal HTTP request all forwarded to HTTPS. Baidu learned that using the default IIS features does not do this, you must install an additional tool: URL rewriting tool. However, it is not installed by default. Here, let's install it first. Install the URL rewriting tool
First, go to the URL Rewriting tool download page and click on the Install this Extension button on the page. This will jump to the Web Platform Installer download page, if you do not have the tool installed, download and install it here, if you have already installed this tool, you can open it directly in IIS, or directly in the Start menu and search for the tool and open it.
Then search the URL on the product page, the first result is the tool to download: URL rewrite tool 2.0. Then click Add, then click on the Install button below. After the installation is complete, you can use this tool in IIS. What to do if not installed
My system is Windows 10, and the corresponding IIS version is 10. But at the time of installation, I was prompted to install more than IIS 7. Here, you need to temporarily modify the registry, the version of IIS is reduced to 9 can be installed, after installation, and then change the version number back to 10.
This needs to open the registry key HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\INETSTP, locate the MajorVersion, change it to 9, and then you can install it successfully. After the installation is complete, change it back to 10.
The system comes with a registry editing tool that is not easy to use, it is recommended registry Workshop, a useful registry editing tool. using the URL rewriting tool
Open the URL rewriting tool to see that you can create multiple rules. The following points are required when redirecting to https: input. What kind of page needs to be manipulated. Conditions. When operations are required, there must be a condition to prevent loops. The destination URL. The URL after the operation.
Detailed Operation method can refer to this article http://www.powerk6.org/2010/10/how-to-use-url-rewrite-to-redirect-http-to-https-on-iis7.html, here is not nonsense.