<VirtualHost *:80>
ServerName your.domain.com
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/?(.*)$ https://%{SERVER_NAME}/$1 [L,R]
</VirtualHost>
apache 80跳转至 443
最新推荐文章于 2024-03-14 13:26:46 发布
<VirtualHost *:80>
ServerName your.domain.com
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/?(.*)$ https://%{SERVER_NAME}/$1 [L,R]
</VirtualHost>