弱點掃描:中風險
建議:將 http 改用 https

解決方法:在 Apache 網站根目錄下編輯 .htaccess 檔案,寫入下面三行,將 80 port (http) 改向 443 port (https)。 註:Domain.Name 需改成正式 Domain Name.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://Domain.Name/$1 [R,L]

另一個方式:在 httpd-vhost.conf 中 <VirtualHost *:80> </VirtualHost> 的段落中加入下面三行.

RewriteEngine on
RewriteCond   %{HTTPS} !=on
RewriteRule   ^(.*)  https://%{SERVER_NAME}$1 [L,R]
最後修改日期: 2019 年 12 月 19 日