<html><head></head><body data-blackberry-caret-color="#008ee0" style="background-color: rgb(255, 255, 255); line-height: initial;"><div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div>                                                                                                                                                                                  <table id="_pHCWrapper" width="100%" style="background-color:white;border-spacing:0px;"> <tbody><tr><td colspan="2" style="font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);">                           <div id="_persistentHeader" style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB Alpha Sans', 'Slate Pro'; font-size: 10pt;">  <div><span style="text-align: initial; line-height: initial; font-family: Tahoma, 'BB Alpha Sans', 'Slate Pro', sans-serif; font-size: initial;">Hello nginx users. </span></div></div></td></tr></tbody></table><div id="_originalContent" style="">
<div>
<br></div>
<div>I am looking to  match and replace part of a URI.</div>
<div>
<br></div>
<div>Given incoming urls of </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>http://www.aaa.com/secure/viewstuff?id=AA:9755744‎</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>and</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>http://www.aaa.com/secure/viewstuff?id=AA9755744</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>I need to remove the AA: portion of the url and leave the number string alone resulting in  http://www.aaa.com/secure/viewstuff?id=9755744 being proxied upstream. </div>
<div><br>
</div>
<div>my starting config looks like this</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre">location /secure/ { if ($query_string ~ "(id=</span>AA<span class="Apple-tab-span" style="white-space:pre">:)|(id=</span>AA<span class="Apple-tab-span" style="white-space:pre">)") { rewrite
</span>string_that_I_cant_get working;<span class="Apple-tab-span" style="white-space:pre"> } allow all; proxy_pass http://</span>upstream_<span class="Apple-tab-span" style="white-space:pre">cluster/;</span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>}</div>
<div><br>
</div>
<div><br>
</div>
<div>Regards</div>
<div>Duane</div>


<br><!--end of _originalContent --></div></body></html>