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