apache修改.htaccess使其強制https訪問

somehow1002發表於2017-10-07

http訪問預設80埠,https訪問預設443埠
首先確保已經可以通過https訪問站點
然後在站點訪問目錄下新增.htaccess

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

相關文章