Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: RewriteCond в Nginx
Hello Serg,
Wednesday, August 13, 2008, 2:39:09 PM, you wrote:
> Не принимает nginx ~ \..{2,4}$
> -- сut --
> location ~ \..{2,4}$
> -- cut --
> location такого вида
- location ~ \..{2,4}$ {
+ 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
>>
>>
--
Best regards,
Denis mailto:denis@xxxxxxxxxx
|