<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/post//</link>
<title><![CDATA[.htaccess实现强制https访问,将http 301重定向到https]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[Web开发]]></category>
<pubDate>Sun, 13 Nov 2016 08:15:38 +0000</pubDate> 
<guid>https://www.heckjj.com/post//</guid> 
<description>
<![CDATA[ 
	最近有个客户要http的301跳转到SSL的https网址，实现如下：<br/>RewriteCond %&#123;ENV:HTTPS&#125; !^on$<br/>RewriteCond %&#123;HTTP:X-Sakura-Forwarded-For&#125; ^$<br/>RewriteRule . https://%&#123;SERVER_NAME&#125;%&#123;REQUEST_URI&#125; [R=301,L]<br/><br/>或者<br/>RewriteCond %&#123;HTTPS&#125; off<br/>RewriteRule ^(.*)$ https://www.hecks.tk/$1 [R=301,L]<br/><br/>或者<br/>RewriteCond %&#123;SERVER_PORT&#125; !^443$<br/>RewriteRule ^.*$ https://%&#123;SERVER_NAME&#125;%&#123;REQUEST_URI&#125; [L,R=301] <br/><br/><br/>#301到www<br/>RewriteCond %&#123;HTTP_HOST&#125; ^hecks.tk$ [NC]<br/>RewriteRule ^(.*)$ https://www.hecks.tk/$1 [L,R=301]<br/><br/>#只跳http的80端口，https是443<br/>RewriteCond %&#123;HTTP_HOST&#125; ^(hecks.tk)(:80)?<br/>RewriteRule ^(.*) https://www.hecks.tk/$1 [R=301,L]
]]>
</description>
</item><item>
<link>https://www.heckjj.com/post//#blogcomment</link>
<title><![CDATA[[评论] .htaccess实现强制https访问,将http 301重定向到https]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>