Modify the following file: IIS6.0 path: C:\WINDOWS\Help\iisHelp\common\403-4.htm
IIS7.0 above path: C:\inetpub\custerr\zh-CN\403.htm
To the following content
<HTML><HEAD><TITLE> This page must be viewed through the secure channel </TITLE>
<meta http-equiv= "Content-type" content= "text/html; Charset=gb2312″>
</HEAD><BODY>
<script type= "Text/javascript" >
var url = window.location.href;
if (Url.indexof ("https") < 0) {
url = url.replace ("http:", "https:");
Window.location.replace (URL);
}
</script>
</BODY></HTML>
Note: In IIS6, Site Properties-"Directory Security-" edit the "Require secure channel (SSL)" tick.
IIS7, 8, SSL Settings-"Require SSL" check.
URL Rewrite method:
Download install URL rewrite module: Microsoft URL Rewrite module
32-bit: Http://download.microsoft.com/download/4/9/C/49CD28DB-4AA6-4A51-9437-AA001221F606/rewrite_x86_zh-CN.msi
64-bit: Http://download.microsoft.com/download/4/E/7/4E7ECE9A-DF55-4F90-A354-B497072BDE0A/rewrite_x64_zh-CN.msi
Asp. NET station can directly modify the Web. config (same as "6, IIS Configuration Diagram" effect), for example: see <rewrite>...</rewrite> node
<?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= "https://{http_host}/{r:1}"/>
< /rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
By default, one server's IIS can only bind one HTTPS, which is port 443.
To implement multiple sites that correspond to HTTPS, you can only change the IIS configuration
Address: C:\Windows\system32\inetsrv\config\applicationHost.config,
The default one site with one such configuration
<binding protocol= "https" bindinginformation= "*:443"/>
modified to:
<binding protocol= "https" bindinginformation= "*:443:www.baidu.om"/>
Remember that you need to modify each site that corresponds.
Finally, if the server can access the HTTPS outside the network does not have to consider the network firewall is not open 443 and whether the use of reverse proxy these.
Professional website Encryption Certificate (4.8 only): http://dianziren.taobao.com