<div dir="ltr">@Richard Interesting. I shall give that a try.</div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">Reg</span>ards,</div><div><br></div><a href="http://www.twitter.com/jdorfman" target="_blank">Justin Dorfman</a><br><br>
Director of Developer Relations<br><a href="http://twitter.com/MaxCDNDeveloper" target="_blank">MaxCDN</a><br><br>Email / IM: <a href="mailto:jdorfman@maxcdn.com" target="_blank">jdorfman@maxcdn.com</a><br></span><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">Mobile: 818.485.1458</span><div>
<div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><span style="background-color:rgb(255,255,255)">Twitter: </span></span><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><span style="background-color:rgb(255,255,255)"><a href="http://www.twitter.com/jdorfman" style="color:rgb(0,0,204)" target="_blank">@jdorfman</a></span></span></div>
</div></div></div>
<br><br><div class="gmail_quote">On Mon, May 5, 2014 at 2:08 PM, Richard Stanway <span dir="ltr"><<a href="mailto:r1ch+nginx@teamliquid.net" target="_blank">r1ch+nginx@teamliquid.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Just a note, I think the preferred way to do this is with "return". It's much simpler (no rewrite / PCRE overhead):<div class=""><div><br></div><div>location / {</div><div><span style="font-family:arial,sans-serif;font-size:13px">if ($scheme = http) {</span><br>
</div></div><div>return 301 https://$http_host$request_uri;<br></div><div><div class="h5"><div>}</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 5, 2014 at 10:54 PM, Justin Dorfman <span dir="ltr"><<a href="mailto:jdorfman@netdna.com" target="_blank">jdorfman@netdna.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Francis, worked perfectly.</div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><div>
<span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">Reg</span>ards,</div><div><br></div><a href="http://www.twitter.com/jdorfman" target="_blank">Justin Dorfman</a><br><br>
Director of Developer Relations<br><a href="http://twitter.com/MaxCDNDeveloper" target="_blank">MaxCDN</a><br><br>Email / IM: <a href="mailto:jdorfman@maxcdn.com" target="_blank">jdorfman@maxcdn.com</a><br></span><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">Mobile: <a href="tel:818.485.1458" value="+18184851458" target="_blank">818.485.1458</a></span><div>
<div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><span style="background-color:rgb(255,255,255)">Twitter: </span></span><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><span style="background-color:rgb(255,255,255)"><a href="http://www.twitter.com/jdorfman" style="color:rgb(0,0,204)" target="_blank">@jdorfman</a></span></span></div>
</div></div></div><div><div>
<br><br><div class="gmail_quote">On Mon, May 5, 2014 at 1:11 PM, Francis Daly <span dir="ltr"><<a href="mailto:francis@daoine.org" target="_blank">francis@daoine.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, May 05, 2014 at 12:14:48PM -0700, Justin Dorfman wrote:<br>
<br>
Hi there,<br>
<div><br>
> I am trying to redirect (301) all HTTP request to TLS (HTTPS) and I keep<br>
> getting duplicate query strings added to the uri. e.g.:<br>
<br>
</div><a href="http://nginx.org/r/rewrite" target="_blank">http://nginx.org/r/rewrite</a><br>
<br>
Second last paragraph looks like it should fix it.<br>
<span><font color="#888888"><br>
f<br>
--<br>
Francis Daly <a href="mailto:francis@daoine.org" target="_blank">francis@daoine.org</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</font></span></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div>