2020-05-04

強制將 http 導向 https

透過 .htaccess 檔案強制將 http 導向 https

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 

變更後的注意事項

  • Javascript, CSS 等外部連結,跟著升級為 https
  • 在 Google Search Console 移除舊的 http 網站,加入 https 新站
  • 重新提交 Sitemap
請我喝杯咖啡吧 ^^
PeiYing Tsai
author
愛藝術,喜歡以科技解決問題的數位產品設計師。 堅持信念,任何困難事,必有搞定的一天,Just try it! 隨手紀錄日常學習到的知識心得,希望對妳/你有幫助。
coffee-cup linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram