<?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>阅微堂 &#187; 域名</title>
	<atom:link href="http://zhiqiang.org/blog/tag/%e5%9f%9f%e5%90%8d/feed" rel="self" type="application/rss+xml" />
	<link>http://zhiqiang.org/blog</link>
	<description>数学、金融、计算机</description>
	<lastBuildDate>Sat, 19 May 2012 13:47:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>重新启用域名zhiqiang.org</title>
		<link>http://zhiqiang.org/blog/memopad/use-zhiqiang-org-again.html</link>
		<comments>http://zhiqiang.org/blog/memopad/use-zhiqiang-org-again.html#comments</comments>
		<pubDate>Mon, 07 Dec 2009 14:03:25 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[记事本]]></category>
		<category><![CDATA[主机]]></category>
		<category><![CDATA[域名]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/?p=966</guid>
		<description><![CDATA[博客 » 记事本 » 主机，域名 » 收到Yahoo的来信，yueweitang.org域名将于1个月内过期，只好重新启用域名 zhiqiang.org 之前停用 zhiqiang.org 是因为备案接入商错误（而且还改不了，因为我不知道是哪位给我备的案），现在要想用启用这个域名，唯一办法就是把blog搬到不需要备案的地方。 所以blog主机从CPH换到了GegeHost。 现在唯一不爽的一点就是某些大学将无法直接访问此blog。 相关...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/memopad">记事本</a> » <a href="http://zhiqiang.org/blog/tag/%e4%b8%bb%e6%9c%ba" rel="tag">主机</a>，<a href="http://zhiqiang.org/blog/tag/%e5%9f%9f%e5%90%8d" rel="tag">域名</a> » </p><p>收到Yahoo的来信，yueweitang.org域名将于1个月内过期，只好重新启用域名 zhiqiang.org</p>
<p>之前停用 zhiqiang.org 是因为备案接入商错误（而且还改不了，因为我不知道是哪位给我备的案），现在要想用启用这个域名，唯一办法就是把blog搬到不需要备案的地方。</p>
<p>所以blog主机从CPH换到了<a style="color: #145ca6; cursor: pointer; text-decoration: none; padding: 0px; margin: 0px;" href="http://www.gegehost.com/">GegeHost</a>。</p>
<p>现在唯一不爽的一点就是某些大学将无法直接访问此blog。</p>
<div><h4>相关文章</h4><ul><li class='currentpost'><a href="http://zhiqiang.org/blog/memopad/use-zhiqiang-org-again.html">重新启用域名zhiqiang.org</a></li><li ><a href="http://zhiqiang.org/blog/it/wordpress-blog-has-different-domains.html">同一WordPress的blog可拥有多个域名</a></li><li ><a href="http://zhiqiang.org/blog/memopad/upgrade-bloghost.html">升级网站空间</a></li><li ><a href="http://zhiqiang.org/blog/memopad/blog-host-is-hacked.html">博客主机被黑</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2009. | <a href="http://zhiqiang.org/blog/memopad/use-zhiqiang-org-again.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/memopad/use-zhiqiang-org-again.html#comments">6 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/memopad/use-zhiqiang-org-again.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>同一WordPress的blog可拥有多个域名</title>
		<link>http://zhiqiang.org/blog/it/wordpress-blog-has-different-domains.html</link>
		<comments>http://zhiqiang.org/blog/it/wordpress-blog-has-different-domains.html#comments</comments>
		<pubDate>Tue, 19 Aug 2008 03:14:31 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[IT技术]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[域名]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/posts/wordpress-blog-has-different-domains.html</guid>
		<description><![CDATA[博客 » IT技术 » blog，WordPress，域名 » 注：与生成静态化文件的插件冲突。 发个技术贴。相同数据库的blog，但可以用不同域名访问。 效果展示： http://zhiqiang.org/blog/ https://zhiqiang.org/blog/ (https连接需要你接受此域名的"假"证书，实现方法) http://yueweitang.org/ 大家知道WordPress的后台需要填写blog的主页地址，而且它也会尽量避免重复页面，所以多域名也是官方所尽量避免的。但某些...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/it">IT技术</a> » <a href="http://zhiqiang.org/blog/tag/blog" rel="tag">blog</a>，<a href="http://zhiqiang.org/blog/tag/wordpress" rel="tag">WordPress</a>，<a href="http://zhiqiang.org/blog/tag/%e5%9f%9f%e5%90%8d" rel="tag">域名</a> » </p><p>注：与生成静态化文件的插件冲突。</p>
<p>发个技术贴。相同数据库的blog，但可以用不同域名访问。</p>
<p>效果展示：</p>
<ul>
<li><a href="http://zhiqiang.org/blog/">http://zhiqiang.org/blog/</a>  </li>
<li><a href="https://zhiqiang.org/blog/">https://zhiqiang.org/blog/</a> (https连接需要你接受此域名的"假"证书，实现方法)  </li>
<li><a href="http://yueweitang.org/">http://yueweitang.org/</a></li>
</ul>
<p>大家知道WordPress的后台需要填写blog的主页地址，而且它也会尽量避免重复页面，所以多域名也是官方所尽量避免的。但某些时候，多个域名看起来比较爽，比如域名闲着也是闲着，yueweitang.org是不是好记点？这时候下面的方法就有用了。</p>
<p>原理是WordPress支持宏定义，可以覆盖后台数据库的option选项。与我们相关的两个option选项是 site_url 和 wp_home。要想覆盖数据库里的选项，定义大写的同名的宏即可。</p>
<p>我所用的代码：</p>
<blockquote><pre><span style="color: #0000ff">&lt;?</span>php
if (isset($_SERVER['<span style="color: #8b0000">HTTPS</span>'])):
 define("<span style="color: #8b0000">WP_SITEURL</span>", "<span style="color: #8b0000">https://zhiqiang.org/blog</span>");
 define("<span style="color: #8b0000">WP_HOME</span>", "<span style="color: #8b0000">https://zhiqiang.org/blog</span>");
elseif ($_SERVER['<span style="color: #8b0000">HTTP_HOST</span>']=='<span style="color: #8b0000">yueweitang.org</span>'):
 define("<span style="color: #8b0000">WP_SITEURL</span>", "<span style="color: #8b0000">http://yueweitang.org</span>");
 define("<span style="color: #8b0000">WP_HOME</span>", "<span style="color: #8b0000">http://yueweitang.org</span>");
endif;
<span style="color: #0000ff">?&gt;</span></pre>
</blockquote>
<p>当然第一步工作是把所有域名都指到同一个目录，这个不同服务器方法不一样，就不多说了。</p>
<div><h4>相关文章</h4><ul><li class='currentpost'><a href="http://zhiqiang.org/blog/it/wordpress-blog-has-different-domains.html">同一WordPress的blog可拥有多个域名</a></li><li ><a href="http://zhiqiang.org/blog/it/my-experiences-and-views-blog.html">我的Blog经历和一些看法</a></li><li ><a href="http://zhiqiang.org/blog/memopad/use-zhiqiang-org-again.html">重新启用域名zhiqiang.org</a></li><li ><a href="http://zhiqiang.org/blog/memopad/hello-world.html">Hello world!</a></li><li ><a href="http://zhiqiang.org/blog/memopad/reading-a-micro-appear-anniversary.html">阅微堂一周年</a></li><li ><a href="http://zhiqiang.org/blog/memopad/blog-is-back-20080915.html">blog回归和杂记20080915</a></li><li ><a href="http://zhiqiang.org/blog/memopad/blog-and-microblog.html">微博对博客的冲击</a></li><li ><a href="http://zhiqiang.org/blog/memopad/blog-host-is-hacked.html">博客主机被黑</a></li><li ><a href="http://zhiqiang.org/blog/it/to-get-gibberish-wordpress-move-to-dreamhost.html">搞定乱码，WordPress搬家到dreamhost</a></li><li ><a href="http://zhiqiang.org/blog/it/wordpress-accelerate-the-pace-of-pages-printed-in-the-generation-and.html">加快WordPress的页面生成和载入速度</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2008. | <a href="http://zhiqiang.org/blog/it/wordpress-blog-has-different-domains.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/it/wordpress-blog-has-different-domains.html#comments">13 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/it/wordpress-blog-has-different-domains.html/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

