HTTP跳转HTTPS伪静态规则,适合使用虚拟机的用户,域名换成自己的即可。
nginx
server_name www.ys720.com ys720.com; if ($host != 'www.wdzzz' ) { rewrite ^/(.*)$ https://www.wdzzz/$1 permanent; }
Apache
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.ys720.com/$1 [R,L]