$request_uri without args

Richard Kearsley Richard.Kearsley at m247.com
Wed Sep 14 16:33:38 UTC 2011


Many thanks, this fixed the problem (or got around it at least :) - so not sure where the bug is but I suspect it's the mixture of ?3456 and ?val=3456 in the query string after the lua pass to backend (I wasn't reading "host" at backend properly, hence 404)


>    local uri = string.gsub(ngx.var.request_uri, "?.*", "")
>    local res = ngx.location.capture("/proxy" .. uri,
>            { args =
>                  { country = ngx.var.geoip_country_code, host = ngx.var.host }
>            } )



More information about the nginx mailing list