IIS实现HTTP重定向到HTTPS
2020-04-05 本文已影响0人
段煜华
使用IIS的URL Rewrite
首先安装 URL Rewrite
https://www.iis.net/downloads/microsoft/url-rewrite


模式:(.*)
条件:添加输入{HTTPS}
检查与模式匹配 模式^OFF$
操作:类型重定向,重定向URLhttps://{HTTP_HOST}/{R:1}
重定向类型永久(301)

首先安装 URL Rewrite
https://www.iis.net/downloads/microsoft/url-rewrite
模式:(.*)
条件:添加输入{HTTPS}
检查与模式匹配 模式^OFF$
操作:类型重定向,重定向URLhttps://{HTTP_HOST}/{R:1}
重定向类型永久(301)