ПРОЕКТЫ 


  АРХИВ 


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: RewriteCond в Nginx


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: RewriteCond в Nginx
  • From: "Serg Senko" <kerncore@xxxxxxxxx>
  • Date: Wed, 13 Aug 2008 10:39:09 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=ZcpN1gOTuerDNvOPemTqh13xY3hkK9pNEE4G7IO+tlY=; b=PpsJoZSAhdC8wm5zLyovN5HDsKgWQ5DJEjaqxLTNCh6YJoj0rt8aKQ+USZqGeohRpS LOiBs2hGjCqIyRM0Z12FFrkPNsxO4N7+ofJvgOrQ4Rr257XXMxvZKXpAgd5/xkxVLYy6 lzoI3JgyCg2n+3S4cbDpXt1R19kjbuoo3B0Pw=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=IMqas8C7HAx1zd1zdP+ND7bdIvNXQ3IC5AriJeNlYnJyZ7F6NAZrnUVAvrtkKJrzOv ZuS+uGXuNlbGDUoEWu3q3K48aHjFKV+2+RWh9NmtyOsaRmMsh7NT03cy61O8RSw/dj7H SoUA5tPE8/quNhpDyvUxRr6Lq4GfycSuw57d8=
  • In-reply-to: <20080812140723.GA90135@xxxxxxxxxxxxx>
  • References: <b35c31660808120628s3c0ec467tc829ee27c0ab4d07@xxxxxxxxxxxxxx> <20080812140723.GA90135@xxxxxxxxxxxxx>

 
Не принимает nginx ~ \..{2,4}$
 
-- сut --
 
location ~ \..{2,4}$
 
-- cut --
 
location такого вида
 
location ~ \..{2,4}$ {
 
            if ($request_method = POST) {
            proxy_pass http://111.111.111.111;
                }
            set   $memcached_key   "$uri?$args";
            memcached_pass  memcached_backend;
            error_page      404 502 504 = @fallback;
                limit_except GET POST {
                deny all;
                }
 
}
 
/usr/local/nginx6/sbin/nginx -t
unknown directive "2,4}$" in /usr/local/nginx6/conf/nginx.conf:122

nginx version: nginx/0.6.32
 
 

 
On 8/12/08, Igor Sysoev <is@xxxxxxxxxxxxx> wrote:
On Tue, Aug 12, 2008 at 04:28:50PM +0300, Serg Senko wrote:

> Пытаюсь сделать такой rewrite в NGINX и уйти на половине серверов с Apache.
> Кто то может с этим помочь ?
>
> RewriteCond %{REQUEST_URI} !^.*\..{2,4}$ [NC]
> RewriteRule ^(.*) index.php [L,NC]

    location / {
        rewrite  ^ /index.php;
    }

    location = /index.php {
        ...
    }

    location ~ \..{2,4}$ {
        ...
    }


--
Игорь Сысоев
http://sysoev.ru




--
ttyv0 "/usr/libexec/gmail Pc"  webcons on secure

 




Copyright © Lexa Software, 1996-2009.