<?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://www.lutuzhi.com/tag/%e9%9d%99%e6%80%81%e5%8c%96/feed" rel="self" type="application/rss+xml" />
	<link>http://www.lutuzhi.com</link>
	<description>一路走来，路途志</description>
	<lastBuildDate>Mon, 08 Aug 2011 16:04:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>WordPress静态化配置之Nginx</title>
		<link>http://www.lutuzhi.com/opensource/306.html</link>
		<comments>http://www.lutuzhi.com/opensource/306.html#comments</comments>
		<pubDate>Tue, 31 Mar 2009 15:15:02 +0000</pubDate>
		<dc:creator>路途志</dc:creator>
				<category><![CDATA[聚焦开源]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[rewriter]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[永久链接]]></category>
		<category><![CDATA[静态化]]></category>

		<guid isPermaLink="false">http://www.lutuzhi.com/opensource/306.html</guid>
		<description><![CDATA[路途志从开博到今天，已经走过了月余。在这一个多月的时间，参考前辈们的经验，对博客进行了大量的定制。其中比较重要的一个工作就是页面静态化—永久链接静态化。在做这个工作的时候，遇到了很大的问题，路途志的服务器是centos5.2+nginx，而公开的资料无一例外都是基于apache的。参考了Nginx wiki和apache的案例，经过多次试验终于在Nginx下实现了Wordpress永久链接静态化，Nginx配置文件的server部分加入下列四行： &#160; #下面四行斜体字实现链接rewrite,http://www.lutuzhi.com中的所有页面实现了静态化&#160; rewrite ^/(index&#124;atom&#124;rsd)\.xml$ http://www.lutuzhi.com last; rewrite ^([_0-9a-zA-Z-]+)?(/wp-.*) $2 last; rewrite ^([_0-9a-zA-Z-]+)?(/.*\.php)$ $2 last; &#160; rewrite ^ /index.php last; 完整的server配置如下： server { &#160; listen&#160;&#160;&#160;&#160;&#160;&#160; 80; &#160; server_name www.lutuzhi.com lutuzhi.com *.lutuzhi.com; &#160; index index.html index.htm index.php; &#160; root&#160; /yuluyu/wp; &#160; #limit_conn&#160;&#160; crawler&#160; 20;&#160;&#160;&#160; &#160; if (!-e $request_filename) { #下面四行斜体字实现链接rewrite,http://www.lutuzhi.com中的所有页面实现了静态化&#160; rewrite ^/(index&#124;atom&#124;rsd)\.xml$ http://www.lutuzhi.com last; rewrite [...]]]></description>
		<wfw:commentRss>http://www.lutuzhi.com/opensource/306.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

