Tricky Rewrite rules.

Gustavo Barrón lists at
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/$1index.html ) {
      rewrite ^(.*)$ 
/wp-content/cache/supercache/$1index.html last;

I was trying to do something like

    if (-f /wp-content/cache/supercache/$uriindex.html ) {
      rewrite ^(.*)$ 
/wp-content/cache/supercache/$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

More information about the nginx mailing list