仅在主主页域中,如何编写从http到https的重定向链接?
Redirect example.com https://example.com
Redirect http://example.com https://example.com
Redirect http://www.example.com https://example.com
Redirect www.example.com https://example.com
要添加.htacess哪个是正确的?
答案 0 :(得分:0)
尝试将HTTP重定向到HTTPS
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]