$request_uri does include the args http://wiki.nginx.org/HttpCoreModule#.24request_uri