天问-高知学习中心
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
全球国家无犯罪证明Police Certificate/Criminal Record/海牙认证/使馆认证/加拿大技术移民:
微信咨询:newnewlandvisa
Home
Help
Login
Register
天问-高知学习中心
»
General Category
»
网站软件工具
»
网站http改https
« previous
next »
Print
Pages: [
1
]
Author
Topic: 网站http改https (Read 685 times)
newnewland
Administrator
Full Member
Posts: 101
网站http改https
«
on:
October 02, 2024, 09:17:52 am »
1.一般的主机后台都有域名绑定,如果有免费的证书,先部署免费的证书(阿里云一个账号有20张,每张3个月,),部署后域名绑定那加载cdn https就可以。
2.还有一种是htaccess改https安全连接方式:不过也要先验证是否有ssl链接:
https://www.sslshopper.com/ssl-checker.html
https://www.a2hosting.com/kb/security/ssl/redirecting-users-to-ssl-connections/
Add the following lines to the desired .htaccess file to redirect users from a non-secure URL (http://) to a secure URL (https://).
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
1. Redirect All Web Traffic
If you have existing code in your .htaccess, add the following:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$
https://www.yourdomain.com/
$1 [R,L]
----下面是写在具体网站的
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*)
https://www.domain.com/
$1 [R=301,L]
«
Last Edit: October 02, 2024, 09:24:31 am by newnewland
»
Logged
Print
Pages: [
1
]
« previous
next »
天问-高知学习中心
»
General Category
»
网站软件工具
»
网站http改https