Streaming flv video to JW FLV media player 4.0
Maxim Dounin
mdounin at mdounin.ru
Sat Jul 5 03:09:01 MSD 2008
Hello!
On Fri, Jul 04, 2008 at 03:50:09PM +0400, Igor Sysoev wrote:
>On Fri, Jul 04, 2008 at 01:30:57PM +0200, Thomas wrote:
>
>> Why is my rewrite rule not working as expected? My video still doesn't
>> want to scrub correctly.
>>
>> Using the following config:
>> ---
>> location ~ ^/videos/[\w|-]+\.flv.* {
>> rewrite ^/(videos)/([\w|-]+\.flv\?start=\d+).* /$1/$2 break;
>> root /public;
>> flv;
>> }
>> ---
>>
>> Using my regexp tool, I get the following:
>>
>> Request:
>> /videos/video.flv?start=3850792&width=280&client=FLASH%20MAC%209,0,124,0&version=4.0%20$Rev:%2030%20$
>>
>> Gets rewritten as:
>> /videos/video.flv?start=3850792
>>
>> Am I not understanding how Nginx rewrite and location work?
>
>rewrite does work not with a query string.
>
>Try the attached patch: it allows several values in query string.
[...]
>- start = ngx_atoof(p, r->args.len - (p - r->args.data));
>+ for (n = p; n < r->args.data + r->args.len; n++) {
>+ if (*n == '&') {
I believe adding check for ';' too is a good idea.
Maxim Dounin
More information about the nginx
mailing list