现在腾讯提供免费的一年证书,地址:https://console.qcloud.com/ssl
nginx重定向 http 自动跳转 https
server
{
listen 80;
server_name honglajiao.org;
index index.html index.htm index.php;
rewrite ^/(.*)$ https://www.honglajiao.org/$1 permanent; //第一种
return 301 https://www.baidu.com$request_uri; //第二种
}
配置ssl证书:
这篇文章主要介绍了Apache mod_rewrite实现HTTP和HTTPS重定向跳转,本文分别给出了HTTP重定向HTTPS和HTTPS重定向HTTP配置参考,需要的朋友可以参考下
当你的站点使用了HTTPS之后,你可能会想把所有的HTTP请求(即端口80的请求),全部都重定向至HTTPS(即端口443)。这时候你可以用以下的方式来做到:(Apache mod_rewrite)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://honglajiao.net/$1 [R=301,L]
</IfModule>
把这段代码放在.htaccess文件,即可实现HTTP到HTTPS的重定向。
可以在有需要自动转到https的网页中在前加入以下代码:
<script language="javascript">
<!--
if(location.protocol == "http:")
location.href=location.href.replace(/^http:/, "https:");
//-->
</script>
这是基于 TYPECHO 基础上,由 @义新 美化设计的一款新主题,主题设计于 2016年06月26日,自 TYPECHO 更新1.0适用。
整体页面风格比较简洁,顶部采用了红色风格。顾名思义,整站专为 红辣椒 而设计的私人使用主题。
最新优化时间:2016.08.08
如果您对该主题感兴趣,请联系站长获取报价。
想要扒皮的朋友,请尊重作者的辛苦作业。Thank You!
Friends want skinned, please respect the author's hard work.Thank You!