<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>301相关文章列表 | 皇家元林</title>
	<atom:link href="https://hjyl.org/tags/301/feed/" rel="self" type="application/rss+xml" />
	<link>https://hjyl.org</link>
	<description>刘元林的个人博客</description>
	<lastBuildDate>Mon, 22 Apr 2013 14:43:14 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://img.hjyl.org/uploads/2019/10/cropped-about-me-32x32.png</url>
	<title>301相关文章列表 | 皇家元林</title>
	<link>https://hjyl.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>HTTPS以后</title>
		<link>https://hjyl.org/after-https/</link>
					<comments>https://hjyl.org/after-https/#comments</comments>
		
		<dc:creator><![CDATA[皇家元林]]></dc:creator>
		<pubDate>Mon, 22 Apr 2013 14:43:14 +0000</pubDate>
				<category><![CDATA[元林手札]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[LNMP]]></category>
		<category><![CDATA[SSL证书]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://hjyl.org/?p=2475</guid>

					<description><![CDATA[记录HTTPS之后遇到的一些问题。]]></description>
										<content:encoded><![CDATA[<p>自给<a title="给http加上s" href="http://hjyl.org/add-s-to-http/" target="_blank">HTTP加了s</a>以后，我折腾了很多，终于将它搞定。主要原因是lnmp调用SSL证书的路径和证书本身的问题。不过都已解决，并且记录在那篇文章的后面。</p>
<p>虽然现在不是很完美，但是看到一把“锁”的感觉还是很舒服的。所以我决定将全站都改成https的，这就意味着我的PR将从零开始，如果运气好的话，会从http 301到https。但这些也不重要了。</p>
<p>首先从后台--设置--常规，将网站的地址和域名都改成https。</p>
<p>其次从phpmyadmin数据库里，用SQL语言UPDATE 表名 SET 字段 = REPLACE(字段,'待替换内容','替换值')修改链接。不过有个缺陷，这应该是WordPress程序的问题，那就是评论中，作者的链接还是http形式。</p>
<p>最后还有个很严重的问题，我的图床站点img.hjyl.org，为了节省流量，我加了防盗链。不过我改成https之后，我这个站点显示的却是防盗链的图片。经过明查暗访，终于找到答案：</p>
<p>location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$<br />
{<br />
valid_referers none blocked <span style="color: #ff0000;">server_names</span> hjyl.org *.hjyl.org;<br />
if ($invalid_referer) {<br />
rewrite ^/ http://hjyl.org/wp-content/themes/yOoo/images/logo.gif;<br />
#return 404;<br />
}<br />
expires 30d;<br />
}</p>
<p>关键是红色部分，我猜！然而效果正如我所想。准，买彩票都没这么准！</p>
<p>好了，暂且这么多！</p>
<div id="content-copyright"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;font-size: 13px;">版权声明: </span><span style="font-size: 13px;">本文采用 <a href="https://hjyl.org/go/aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzMuMC8=" rel="nofollow" target="_blank">BY-NC-SA</a> 协议进行授权，如无注明均为原创，转载请注明转自 <a href="https://hjyl.org">皇家元林</a><br>本文链接: <a rel="bookmark" title="HTTPS以后" href="https://hjyl.org/after-https/">HTTPS以后</a></span></div>]]></content:encoded>
					
					<wfw:commentRss>https://hjyl.org/after-https/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
