ПРОЕКТЫ 


  АРХИВ 


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: "?" в $request_uri


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: "?" в $request_uri
  • From: Andrey Ignatov <andr.pl@xxxxxxxxx>
  • Date: Tue, 20 Nov 2007 16:55:42 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:from:to:subject:message-id:references:mime-version:content-type:content-disposition:content-transfer-encoding:in-reply-to:user-agent:x-useless-header; bh=C5bu8nUG609AnqD2RyRImmsi7H9Pt6UYvpMnplKRBvU=; b=QwZ3FKMyXXM4zwsQNmsBOv6j6PiBNWBi3hP/Mv1UqcepPKEQxkLXrIyNzCfXsxYpYWxo5tKap0xm8KNKJWoUzXO9Ime8M1kiFp8PHJOo7DQrpI1zLf3XnfDOxf3hvW9a3VzyQc6zoQWSui3G4I3z4hHdwmHKo8dOt1OcfkmvtZ4=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:subject:message-id:references:mime-version:content-type:content-disposition:content-transfer-encoding:in-reply-to:user-agent:x-useless-header; b=RkiI+TuptZn2pbR5tczW4h3Q5N9553P/RcZfG9rvhjmt0UHBW0kEuiJaaoN4amddfeU08UPdPStZYGots8mro3Dl55WZd/6qR7Jzc1fhtdOuF9jUD2bw5p3MkfJK/tAJyz5qame21Lb7G9g7jgcTtRch+mU6lIJVHPhxo9b1nEw=
  • In-reply-to: <20071120133511.GK38005@xxxxxx>
  • References: <20071120131857.GA55410@xxxxx> <20071120133511.GK38005@xxxxxx>

On Tue, Nov 20, 2007 at 04:35:12PM +0300, Dmitriy Yermakov wrote:
> On Tue, Nov 20, 2007 at 04:18:57PM +0300, Andrey Ignatov wrote:
> > re all
> > 
> > Есть вот такая конструкция в конфиге:
> > 
> > -------------------------------------
> > if ($request_uri ~ "^/v/?video=([0-9]+)$") {
> >     set $clip_id    $1;
> >     rewrite ^.*$    /video.phtml?clip_id=$clip_id last;
> > }
> > -------------------------------------
> > 
> > Делаю браузером:
> pcretest'ом его надо ;)

Спасибо за наводку.
pcretest действительно все расставил по местам :>


> $ pcretest
> PCRE version 7.0 18-Dec-2006
> 
>   re> #^/v/?video=([0-9]+)$#
> data> /v/?video=28
> No match
> data>
>   re> #^\/v\/\?video=([0-9]+)$#
> data> /v/?video=28
>  0: /v/?video=28
>  1: 28
> data>
>  
> > 2007/11/20 12:43:14 [debug] 30732#0: *13 http script var
> > 2007/11/20 12:43:14 [debug] 30732#0: *13 http script var: "/v/?video=28"
> > 2007/11/20 12:43:14 [debug] 30732#0: *13 http script regex: 
> > "^/v/?video=([0-9]+)$"
> > 2007/11/20 12:43:14 [debug] 30732#0: *13 http script if
> > 2007/11/20 12:43:14 [debug] 30732#0: *13 http script if: false
> > 
> > Т.е. regexp не срабатывает.
> > В чем тут может быть дело ?
> 
> regexp неверный
> 
> -- 
> Dmitriy Yermakov, CCS SUT
> dyer@xxxxxx
> 

-- 
Andrey Ignatov
Skript, System administrator



 




Copyright © Lexa Software, 1996-2009.