Hi,<br><div dir="ltr"><div><div><div><div><div><div><div><div><br></div>I need to pass a certain URI namespace to an upstream servers, while taking away the prefix. Consider following configuration:<br><br>    location ^~ /going-to-upstream/ {<br>

        access_log off;<br>        rewrite /upstream(/.*) $1 break;<br>        proxy_pass <a href="http://upstream" target="_blank">http://upstream</a>;<br>    }<br>    <br>    location / {<br></div>        # Actual server<br>
    }<br><br>
</div>So, whenever I will get a request to <a href="http://server/going-to-upstream/something" target="_blank">http://server/going-to-upstream/something</a> -> I should have a request in my upstream server for "/something". And I do.<br>

<br></div>However, as soon as the upstream part has something urlencoded, for example an url, nginx decodes the url and passes it in decoded format to the upstream. An example:<br><br><a href="http://server/going-to-upstream/something/http%3A%2F%2Fserver%2F" target="_blank">http://server/going-to-upstream/something/http%3A%2F%2Fserver%2F</a><br>

</div>will cause an upstream request "/something/<a href="http://server/" target="_blank">http://server/</a>" while I would need literally "/something/http%3A%2F%2Fserver%2F"<br><br></div>How could I make the nginx to not decode the URI in rewrite?<br>

<br></div>(My actual use case is related to using Thumbor, see <a href="http://tech.yipit.com/2013/01/03/how-yipit-scales-thumbnailing-with-thumbor-and-cloudfront/" target="_blank">http://tech.yipit.com/2013/01/03/how-yipit-scales-thumbnailing-with-thumbor-and-cloudfront/</a> . They have a dedicated nginx server { } for this, but I need to use an existing to make Thumbor urls to live under our main application domain.)<br>

<br></div>Best regards,<br>Ville<br></div>
<br>