<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>nginx rewrite removes duplicate slashes when I don't want it to</title>
<description>Hey,

I have an nginx server with a location based proxy_pass configured:

location /taz {
rewrite /taz/(.*) /$1 break;
proxy_pass http://localhost:8080;
}

It is used for click tracking before redirecting, I have found that when the request is proxied back to the system running on port 8080 that the request is being modified by nginx, more than I've configured.

If I go to http://server/taz/12345/http://google.com

It actually requests: http://localhost:8080/12345/http:/google.com

As you'll see the second http:// call is missing a slash.

I know it's bad to pass the second http:// through but they are legitimate characters as far as I'm aware, and it's fast for me to grab everything after the first set of / / and just set a Location header for the browser to redirect to it.

Anyone have any ideas?</description><link>http://forum.nginx.org/read.php?15,227685,227685#msg-227685</link><lastBuildDate>Sun, 26 May 2013 04:53:54 -0400</lastBuildDate>
<generator>Phorum 5.2.16</generator>
<item>
<guid>http://forum.nginx.org/read.php?15,227685,227685#msg-227685</guid>
<title>nginx rewrite removes duplicate slashes when I don't want it to</title><link>http://forum.nginx.org/read.php?15,227685,227685#msg-227685</link><description><![CDATA[Hey,<br /><br />I have an nginx server with a location based proxy_pass configured:<br /><br />location /taz {<br />rewrite /taz/(.*) /$1 break;<br />proxy_pass http://localhost:8080;<br />}<br /><br />It is used for click tracking before redirecting, I have found that when the request is proxied back to the system running on port 8080 that the request is being modified by nginx, more than I've configured.<br /><br />If I go to http://server/taz/12345/http://google.com<br /><br />It actually requests: http://localhost:8080/12345/http:/google.com<br /><br />As you'll see the second http:// call is missing a slash.<br /><br />I know it's bad to pass the second http:// through but they are legitimate characters as far as I'm aware, and it's fast for me to grab everything after the first set of / / and just set a Location header for the browser to redirect to it.<br /><br />Anyone have any ideas?]]></description>
<dc:creator>Kura</dc:creator>
<category>Other discussion</category><pubDate>Tue, 19 Jun 2012 09:57:26 -0400</pubDate></item>
</channel>
</rss>