0
我有ssl證書但沒有使用它。這段代碼應該強制爲http和www。它的工作原理在這種情況沒有www到www沒有使用https
http://mysite科網>>http://www.mysite科網 https://www mysite的點com >>http://www.mysite科網
但是當我鍵入
https://mysite科網>>我得到保密和錯誤紅色標記的連接不是私人
您的連線不是私人
名攻擊者可能會試圖從
竊取您的信息這是我的代碼
#Force WWW + SSL
#RewriteCond %{HTTP_HOST} !^www\.mysite\.com
#RewriteRule (.*) https://www.mysite dot com/$1 [R=301,L]
#RewriteCond %{HTTPS} !=on
#RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} =on
RewriteRule ^/?(.*)$ http://%{HTTP_HOST}/$1 [L,R=301]
注意前五個行是註釋(它們用於HTTPS和我禁用)。現在我需要更新htaccess代碼的第二部分。