Re: URI rewriting based on arguments

2014-11-08 Thread B.R.
That would be a logical conclusion. However, rewrite documentation is unclear about that. It says 'If the specified regular expression matches a request URI', and nginx has a $request_uri

Re: URI rewriting based on arguments

2014-11-07 Thread Edho Arief
On Sat, Nov 8, 2014 at 11:31 AM, B.R. wrote: > Hello, > > Trying to rewrite an URI based on an argument, I cannot match it otherwise > than by using rewrite. > > The problem is I fail to achieve a working recipe rewriting > example.com/watch?v=123456 > to > example.com/watch?vid=123456 > > rewrite

URI rewriting based on arguments

2014-11-07 Thread B.R.
Hello, Trying to rewrite an URI based on an argument, I cannot match it otherwise than by using rewrite. The problem is I fail to achieve a working recipe rewriting example.com/watch?v=123456 to example.com/watch?vid=123456 rewrite ^/watch\?v=(?\d+)$ $scheme://$host$uri?vid=$video? does not seem