htaccess强制https循环重定向

一般是CDN导致,可将代码改成:
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

像前几天的法国OVH免费云主机,就需要用这个强制https
1