很多情況,我們會需要透過 .htaccess 強制 https 這個設定也非常重要。 RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]