默认跳转https

进入到网站的根目录下
创建.htaccess
.htaccess内容:
RewriteEngine on
RewriteBase /
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

你可能感兴趣的:(默认跳转https)