从http重定向到https

时间:2015-05-07 19:09:07

标签: .htaccess

http http / www 重定向到 https - 我使用代码

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

但它会调用ERR_TOO_MANY_REDIRECTS

2 个答案:

答案 0 :(得分:0)

一旦这样做,您需要告诉redirectstop。创建重写时,在末尾使用适当的标志。

RewriteEngine On
RewriteCond %{HTTPS} !^on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

答案 1 :(得分:0)

试试这个

(100 - skill) + '%'