Tricky Rewrite rules.

Gustavo Barrón lists at ruby-forum.com
Mon Nov 19 09:30:32 MSK 2007


HonDev Developer wrote:
> By the way I don't think you'll need to  use the gzip component of
> wp-super-cache on nginx since nginx already has on the fly gzip.
> (compression as I understand it.)

Yeah I forgot to tell that nginx is already serving gzip files, but on 
big scenarios, with many users, serving a precompressed file instead of 
doing it on the fly, would help greatly on the performance.

also insted of:

    if (-f /wp-content/cache/supercache/mydomain.com/$1index.html ) {
      rewrite ^(.*)$ 
/wp-content/cache/supercache/mydomain.com/$1index.html last;
    }

I was trying to do something like

    if (-f /wp-content/cache/supercache/mydomain.com/$uriindex.html ) {
      rewrite ^(.*)$ 
/wp-content/cache/supercache/mydomain.com/$uriindex.html last;
    }

But obviously returns a error, is there a way of a) setting a variable 
on nginx b)escape the i on index.html in order to separate the variable 
from the text when the config is parsed.


-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list