# Wordpress 3.0 wp super cache rewrite rule?

**URL:** <https://www.ruby-forum.com/t/wordpress-3-0-wp-super-cache-rewrite-rule/192630>\
**Category:** NGINX\
**Created:** [August 3, 2010, 12:30pm UTC](https://www.ruby-forum.com/t/wordpress-3-0-wp-super-cache-rewrite-rule/192630 "2010-08-03T12:30:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![max](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@max](https://www.ruby-forum.com/u/max)\
**Post date:** [August 3, 2010, 12:30pm UTC](https://www.ruby-forum.com/t/wordpress-3-0-wp-super-cache-rewrite-rule/192630/1 "2010-08-03T12:30:38Z")

</div>

Does anyone know the nginx rewrite rule for wordpress 3.0 wp super cache  
(multi site)?

I found an example on this site:  
[http://kuapp.com/2010/06/30/nginx-rewrite-rules-of-wordpress-3-0-permalinks-and-wp-super-cache.html](http://kuapp.com/2010/06/30/nginx-rewrite-rules-of-wordpress-3-0-permalinks-and-wp-super-cache.html)

But I am not sure whether this can work with multi site. Thanks a lot.

Max

---

<div class="post-metadata">

**Author:** ![max](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@max](https://www.ruby-forum.com/u/max)\
**Post date:** [August 4, 2010, 11:00am UTC](https://www.ruby-forum.com/t/wordpress-3-0-wp-super-cache-rewrite-rule/192630/2 "2010-08-04T11:00:43Z")

</div>

On 03.08.2010 12:29, Max wrote:

> Does anyone know the nginx rewrite rule for wordpress 3.0 wp super cache  
> (multi site)?
> 
> I found an example on this site:  
> [http://kuapp.com/2010/06/30/nginx-rewrite-rules-of-wordpress-3-0-permalinks-and-wp-super-cache.html](http://kuapp.com/2010/06/30/nginx-rewrite-rules-of-wordpress-3-0-permalinks-and-wp-super-cache.html)
> 
> But I am not sure whether this can work with multi site. Thanks a lot.
> 
> Max

Hi,

I have only:

try\_files $uri $uri/ /index.php?q=$uri&$args;

and looks like ‘wp-super-cache’ on mine wordpress3 work flawless, but it  
is not wordpress MU, just one blog.

With this rule I was able to set any permalinks type what I want.

– Piotr.

---

<div class="post-metadata">

**Author:** ![max](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@max](https://www.ruby-forum.com/u/max)\
**Post date:** [August 4, 2010, 12:08pm UTC](https://www.ruby-forum.com/t/wordpress-3-0-wp-super-cache-rewrite-rule/192630/3 "2010-08-04T12:08:04Z")

</div>

Hi Piotr,

Thanks. I tried your rewrite rule, but it seems it doesn’t work with  
multisite. I can’t see any cache page generated.

Your rewrite rule is interesing, so simple, but as long as it get thing  
done, it’s ok. I used to use the following rule to make the permalinks  
works.

rewrite ^._/files/(._)$ /wp-includes/ms-files.php?file=$1 last;  
if (!-e $request\_filename) {  
rewrite ^.+?(/wp-._) $1 last;  
rewrite ^.+?(/._.php)$ $1 last;  
rewrite ^ /index.php last;  
}

Max

---

<div class="post-metadata">

**Author:** ![max](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@max](https://www.ruby-forum.com/u/max)\
**Post date:** [August 5, 2010, 12:45am UTC](https://www.ruby-forum.com/t/wordpress-3-0-wp-super-cache-rewrite-rule/192630/4 "2010-08-05T00:45:44Z")

</div>

On 04.08.2010 12:06, Max wrote:

> Hi Piotr,
> 
> Thanks. I tried your rewrite rule, but it seems it doesn’t work with  
> multisite. I can’t see any cache page generated.

You need change something in wp-super-cache for MU if I remember correct  
(check readme.txt).

> Your rewrite rule is interesing, so simple, but as long as it get thing  
> done, it’s ok. I used to use the following rule to make the permalinks  
> works.
> 
> rewrite ^._/files/(._)$ /wp-includes/ms-files.php?file=$1 last;  
> if (!-e $request\_filename) {  
> rewrite ^.+?(/wp-._) $1 last;  
> rewrite ^.+?(/._.php)$ $1 last;  
> rewrite ^ /index.php last;  
> }

Well I not fully understand your 2nd rule, with ! -e but it is working?  
You rewritting all requests targeted to non-existing files to 3 others  
thing? Last rewrite doing the same thing what nginx’s try\_files.

I have on the end of my blog (generated page):

So it’s working for me.

– Piotr.
