http 网址重定向到https

添加http.ini文件

 1 [ISAPI_Rewrite]
 2 CacheClockRate 3600
 3 RepeatLimit 32
 4 
 5 RewriteCond %{HTTPS} on
 6 RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
 7 RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]
 8 
 9 
10 RewriteCond %{HTTPS} off
11 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

猜你喜欢

转载自www.cnblogs.com/qishidz/p/9639373.html