ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: заголовок Accept-Encoding и -f mod_rewrite


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: заголовок Accept-Encoding и -f mod_rewrite
  • From: Roxis <roxis@xxxxxxx>
  • Date: Sat, 3 Mar 2007 15:12:20 +0100
  • Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:sender; b=XlCx8qXf6JcPet4+H8T74gb17K1gZbVRHB7paXulSKHmFDMbNgusNdGA3StnUrjYWdEhlG+9nHjjjikiQ6LBhIrVpDwJS0rhShrRztCj2uuF2VKmkVP8xW/sRRcUb0Lmy7yQgZcQeRLrP9eYdVeC121beZB+sTu7tfDwX2pr8fM=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:sender; b=Pc1sku3f3hct5dUAAql9J2u1veaK+BPH+m/tzBj/OWOy2N81zS/7Un/XlTymdLe65DrJXYL0q7m+UowwfSfiIu3zSKJCbp7evEz/cXvU0bKfpnTXLaJv3koPpqe83x2JenS8B5NF8Uw6p2lqhsNBJ70E0drtXWVZ6P6vqMOyA6o=
  • In-reply-to: <45E97021.4080701@xxxxxxxxxx>
  • References: <302226751.20070303151006@xxxxxxx> <45E97021.4080701@xxxxxxxxxx>

On Saturday 03 March 2007, Александр Ворона wrote:
> Alexey Rymonin пишет:
> >     if (!-f $wwwroot$request_uri.gz) {
> >        rewrite  ^(.*)$  $1.gz  last;
> >     }
>
> Например так
> set $mydocroot /var/www/$my_domain/web;
> .....
> root $mydocroot;
> if (!-f $mydocroot$request_uri.gz) {
> .....

    location ~ \.html?$ {
        if ($http_accept_encoding !~ gzip) {
            break;
        }
        if ( !-f $document_root$uri.gz) {
            break;
        }

        rewrite ^(.+)$ $1.gz last;
    }

    location ~ \.gz$ {
        default_type text/html;
        add_header Content-Encoding gzip;
    }




 




Copyright © Lexa Software, 1996-2009.