https做301跳轉的操作方法:
1.虛擬主機綁定域名:123.com,然后開啟HTTPS訪問。
2.在網站根目錄新建一個“.htaccess”文件,添加以下代碼即可。
<IfMobaile mod_rewrite.c>RewriteEngine onRewriteBase /RewriteCond %{SERVER_PORT}!^443$RewriteRule (.*)https://www.123.com/$1 [R=301,L]</IfMobaile>
<IfMobaile mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{SERVER_PORT}!^443$
RewriteRule (.*)https://www.123.com/$1 [R=301,L]
</IfMobaile>