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>