Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"?" в $request_uri
- To: nginx-ru@xxxxxxxxx
- Subject: "?" в $request_uri
- From: Andrey Ignatov <andr.pl@xxxxxxxxx>
- Date: Tue, 20 Nov 2007 16:18:57 +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:mime-version:content-type:content-disposition:content-transfer-encoding:user-agent:x-useless-header; bh=mF+Uq3eZ756s5hFATnXlbAr9N35UHmN5bSOmB+2f9ZY=; b=RoSFvYs67MOefncz62JI2zUNd9vLjbO5X4/2s8rRCxeYazxkKBMPVljg4aPZp6sZlSY859AifgY3K3lpHOfcsXFu2w8wgcvwQQRsiMijjt8WhoJEym6ikwUAaxtSac8sIhhFDGj1+AyGDQlyN8vyQXZnPF1/6xHuKfhPg5BTpc4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:subject:message-id:mime-version:content-type:content-disposition:content-transfer-encoding:user-agent:x-useless-header; b=YyjtI75yf6z5HnzEd/7FSPuAs3u304ybcwo0HOVhekriegwYRZr2EmaXIvo3p6zHn6dkXualO0RrxkBsH9KskLCvNwhPhsP61JN5WYtJJhbm+6TYsbzPNy+rvh8JpX59X4e4bVNDM/XCTG+9nEW3sIRFGTXKyz0533wkgUFFNas=
re all
Есть вот такая конструкция в конфиге:
-------------------------------------
if ($request_uri ~ "^/v/?video=([0-9]+)$") {
set $clip_id $1;
rewrite ^.*$ /video.phtml?clip_id=$clip_id last;
}
-------------------------------------
Делаю браузером:
2007/11/20 12:43:14 [debug] 30732#0: *13 http process request line
2007/11/20 12:43:14 [debug] 30732#0: *13 recv: eof:0, avail:234, err:0
2007/11/20 12:43:14 [debug] 30732#0: *13 recv: fd:27 234 of 1024
2007/11/20 12:43:14 [debug] 30732#0: *13 http request line: "GET /v/?video=28
HTTP/1.0"
2007/11/20 12:43:14 [debug] 30732#0: *13 http uri: "/v/"
2007/11/20 12:43:14 [debug] 30732#0: *13 http args: "video=28"
2007/11/20 12:43:14 [debug] 30732#0: *13 http exten: ""
2007/11/20 12:43:14 [debug] 30732#0: *13 http process request header line
2007/11/20 12:43:14 [debug] 30732#0: *13 http header: "Host: domain.com"
2007/11/20 12:43:14 [debug] 30732#0: *13 http header: "Accept: text/html,
text/plain, text/sgml, */*;q=0.01"
2007/11/20 12:43:14 [debug] 30732#0: *13 http header: "Accept-Encoding: gzip,
compress"
2007/11/20 12:43:14 [debug] 30732#0: *13 http header: "Accept-Language: en"
2007/11/20 12:43:14 [debug] 30732#0: *13 http header: "User-Agent:
Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7e"
2007/11/20 12:43:14 [debug] 30732#0: *13 http header done
И на проверке регекспов происходит вот такое:
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 не срабатывает.
В чем тут может быть дело ?
nginx version: nginx/0.6.17
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt=-I
/usr/local/include --with-ld-opt=-L /usr/local/lib
--conf-path=/usr/local/etc/nginx/nginx.conf
--sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid
--error-log-path=/var/log/nginx-error.log --user=www --group=www
--with-debug
--http-client-body-temp-path=/var/tmp/nginx/client_body_temp
--http-proxy-temp-path=/var/tmp/nginx/proxy_temp
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp
--http-log-path=/var/log/nginx-access.log --with-http_stub_status_module
--
Andrey Ignatov
Skript, System administrator
|