认证地址
效果展示

步骤:
前提条件
你的网站http和https都能访问。我这里演示的是tomcat web容器,如果你是其它的web容器,可以自行查找百度,肯定有相应的配置方法。
配置Web.xml
<security-constraint>
<web-resource-collection >
<web-resource-name >SSL</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
重启服务

测试
通过http方式访问你的网站,如果能自动调转到https链接,访问到你的网站,就配置正常了!然后就去https://ziyuan.baidu.com/https/index提交你网站的https链接地址
http://www.yundashi168.com/ 这是我的网站,你点击进去,会自动调转到https链接。
网友评论