IIS 8.0 发布网站。SSL部署后,将http自动强制转换https访问

1.打开C:\inetpub\custerr\en-US中的403.htm 文件,在body节点 中增加如下js 代码

var url = window.location.href;
if (url.indexOf("https") < 0) {
url = url.replace("http:", "https:");
window.location.replace(url);
}

2.双击IIS下发布的站点,双击SSL Settings 后选中require SSL 选项,保存即可
IIS 8.0 发布网站。SSL部署后,将http自动强制转换https访问_第1张图片
IIS 8.0 发布网站。SSL部署后,将http自动强制转换https访问_第2张图片

你可能感兴趣的:(IIS-发布)