Getting rewritten and encoded/escaped url in nginx module
Jayadev C
jayadev at ymail.com
Tue Jun 3 16:42:41 UTC 2014
Hi,
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 :
newpath1/newpath2/newpath3/../urlencoded(key)?args.
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.
Thanks,
Jayadev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140603/691729a2/attachment.html>
More information about the nginx
mailing list