443端口 阿里云配置 Apache SSL证书 .htaccess

443端口 阿里云配置 Apache SSL证书时,用到.htaccess文件,此文件放在网站根目录下.实现跳转到https,在记事本输入以下代码后,保存名字为.htaccess,扩展名是所有文件.




<IfModule mod_rewrite.c>
     RewriteEngine on
     RewriteBase / 
     RewriteCond %{SERVER_PORT} !^443$
     RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
 </IfModule>

猜你喜欢

转载自blog.csdn.net/zhengleiqing/article/details/53233085
今日推荐