我們能否HTTPS僅供主頁即對於重定向規則到https
example.com 或http://example.com或 www.example.com 或http://www.example.com
剩下的所有頁面應該以http開頭。
我已經試過這樣的,但它沒有工作
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} "^/$"
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteRule ^(.*) http://%{HTTP_HOST}%{REQUEST_URI}