<?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>Glen Lumanau &#187; cache</title>
	<atom:link href="http://lumanau.web.id/tag/cache/feed" rel="self" type="application/rss+xml" />
	<link>http://lumanau.web.id</link>
	<description>About Glen Lumanau</description>
	<lastBuildDate>Fri, 23 Jul 2010 10:08:00 +0000</lastBuildDate>
	<language></language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Nginx Rewrite rules for WordPress MU with Wp Super Cache plugin enabled</title>
		<link>http://lumanau.web.id/2008/11/27/nginx-rewrite-rules-for-wordpressmu-with-wp-super-cache-plugin-enabled.html</link>
		<comments>http://lumanau.web.id/2008/11/27/nginx-rewrite-rules-for-wordpressmu-with-wp-super-cache-plugin-enabled.html#comments</comments>
		<pubDate>Thu, 27 Nov 2008 05:32:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[wordpress mu]]></category>
		<category><![CDATA[wordpressmu]]></category>

		<guid isPermaLink="false">http://www.lumanau.web.id/?p=116</guid>
		<description><![CDATA[I&#8217;ve spending my time to search how wordpressMU on nginx can support WP Super Cache plugin By default they only giving us the rewrite rules for Apache Default nginx rewrite rules without WP Super Cache plugin rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1; if (!-e $request_filename) { rewrite ^.+?(/wp-.*) $1 last; rewrite ^.+?(/.*\.php)$ $1 last; rewrite ^ /index.php last; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spending my time to search how wordpressMU on nginx can support <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache plugin</a></p>
<p>By default they only giving us the rewrite rules for <a href="http://www.apache.org">Apache</a></p>
<p>Default nginx rewrite rules without WP Super Cache plugin</p>
<blockquote><p>rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;<br />
if (!-e $request_filename) {<br />
rewrite ^.+?(/wp-.*) $1 last;<br />
rewrite ^.+?(/.*\.php)$ $1 last;<br />
rewrite ^ /index.php last;<br />
}</p></blockquote>
<p>WP Super Cache plugin will not able to run with that rewrite rules. So now the question is, How can we make nginx rewrite rule to work with WP Super Cache plugin ?</p>
<p><span id="more-116"></span></p>
<p>Here&#8217;s my nginx config that&#8217;s running very well <img src='http://lumanau.web.id/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>if (-f $request_filename) {<br />
break;<br />
}</p>
<p>if (-d $request_filename) {<br />
break;<br />
}</p>
<p>rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;</p>
<p>if (!-e $request_filename) {<br />
rewrite ^.+/?(/wp-.*) $1 last;<br />
rewrite ^.+/?(/.*\.php)$ $1 last;<br />
rewrite ^(.+)$ /index.php?q=$1 last;<br />
}</p>
<p>set $supercache_file &#8221;;<br />
set $supercache_uri $request_uri;</p>
<p>if ($request_method = POST) {<br />
set $supercache_uri &#8221;;<br />
}</p>
<p>if ($query_string) {<br />
set $supercache_uri &#8221;;<br />
}</p>
<p>if ($http_cookie ~* &#8220;comment_author_|wordpress|wp-postpass_&#8221; ) {<br />
set $supercache_uri &#8221;;<br />
}</p>
<p>if ($supercache_uri ~ ^(.+)$) {<br />
set $supercache_file /wp-content/cache/supercache/$http_host/$1index.html;<br />
}</p>
<p>if (-f $document_root$supercache_file) {<br />
rewrite ^(.*)$ $supercache_file break;<br />
}</p></blockquote>
<p>Congratulations that you have successfully make your nginx to work with WP Super Cache plugin</p>
]]></content:encoded>
			<wfw:commentRss>http://lumanau.web.id/2008/11/27/nginx-rewrite-rules-for-wordpressmu-with-wp-super-cache-plugin-enabled.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
