<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 9, 2013 at 2:37 AM, lupin <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
 Any way to disable urlencode on nginx with proxy_pass? Following is my<br>
config and as suggested on google I already removed the "/" URI part of<br>
of this "proxy_pass  <a href="http://127.0.0.1:8090" target="_blank">http://127.0.0.1:8090</a>;"<br>
<br>
 Any idea how to proceed with this?<br>
<br></blockquote><div><br></div><div style>I think I might have ran into something similar before.</div><div style><br></div><div style>Internally Nginx has 2 ways to deal with this directive : </div><div style><br></div>

<div style>    proxy_pass  <a href="http://127.0.0.1:8090/" target="_blank">http://127.0.0.1:8090</a>;<br></div><div style><br></div><div style>Either you've never touched the internal uri (no internal redirects for instance) and your outgoing uri is going to be exactly the same as the incoming uri. Internally r->valid_unparsed_uri is set to 1.</div>

<div style><br></div><div style>Or your internal has been modified, and the outgoing uri used by proxy_pass will be re-normalized. </div><div style>The re-normalization process might turn up differences between incoming and outgoing uri.</div>

<div style><br></div><div style>Another way to force Nginx to send out exactly what you want is to do something like this :</div><div style><br></div><div style>    map '' $seed_uri {</div><div style>        default $request_uri;</div>

<div style>    }</div><div style><br></div><div style>    proxy_pass  <a href="http://127.0.0.1:8090/" target="_blank">http://127.0.0.1:8090</a>$seed_uri;<br></div><div style><br></div><div style>This way you're forcing what comes in to be exactly what comes out, but this comes with a price and you won't be able to use internal redirection and will have to modify the content of $seed_uri manually, using if and regexps for instance.</div>

<div style><br></div><div style>Hope that helps,</div><div style><br></div><div style>Matthieu.</div></div></div></div>