Getting rewritten and encoded/escaped url in nginx module
reallfqq-nginx at yahoo.fr
Tue Jun 3 17:09:08 UTC 2014
I am not providing a direct answer but could not you use some standard
modules to do that?
Such as using (examples):
- rewrite associated with a map, loaded from a separate configuration file
reloaded after changes
- the perl module <http://nginx.org/en/docs/http/ngx_http_perl_module.html>
to invoke external perl scripts doing that for you, maybe in conjunction
with the ssi module <http://nginx.org/en/docs/http/ngx_http_ssi_module.html>
On Tue, Jun 3, 2014 at 6:42 PM, Jayadev C <jayadev at ymail.com> wrote:
> I am writing a nginx proxy module and want to grab the url which is
> urlencoded (as the client sends it) and also after rewrite rules are
> applied. My typical url looks like :
> path1/path2/path3/urlencoded(key)?args , after rewriting the url I would
> love to have is something like :
> Currently , r->uri is decoded rewritten uri, r->unparsed_uri is encoded
> but not rewritten.
> I read on the forum that nginx decodes the url for rewrite, is there a
> handy internal function I can use encode the rewritten url back. A simple
> use of ngx_escape_uri(r->uri) with different parameters doesn't do what I
> want out of the box.
> nginx mailing list
> nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx