trouble changing uri to query string

Francis Daly francis at daoine.org
Wed Sep 17 07:17:07 UTC 2014


On Mon, Sep 15, 2014 at 02:57:34PM +0300, Roland RoLaNd wrote:

Hi there,

this is all untested by me...

> i have a url looking as such:  mysite.com/some/path/rest/v2/giveit.view&user=282&imageid=23&size=80
> 
>  i want the cache key to match imageid=23&size=80 without the "user" part.

You could try using "map" to define a variable which is 'the url without
the part that matches "user=[0-9]+&"', and then use that in the cache
key, perhaps?

> $args isn't matching because incoming url lacks the "?" part, so $uri is detected as mysite.com/some/path/rest/v2/giveit.view&imageid=23&size=80

$url probably starts with the character "/".

> Is there a way i could force nginx to detect that query string, or rewrite/set the args on each request ?

There is no query string.

You may find it easier to switch to "standard" http/cgi-like urls. But
that's a separate thing.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list