<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On 28 May 2014, at 03:52, Peter Mescalchin <<a href="mailto:peter.mescalchin@gmail.com">peter.mescalchin@gmail.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hello Nginx developers,<div><br></div><div>   speaking to Maxim Konovalov over Twitter, suggested this would be the better place to get an answer to my suggestion.</div><div><br></div><div>Basically what I would like to see is the ability to use a rewrite directive without the need to capture the current URI, which in turn overwrites $1,$2,$x captures made within a location directive.</div>
<div><br></div><div>Best to explain via an example:</div><div><br></div><div><a href="https://gist.github.com/magnetikonline/11364574">https://gist.github.com/magnetikonline/11364574</a><br></div><div><br></div><div><br></div>
<div>As you can see, this works (and works well) but the need to use "set" to save copies of $1/$2 seems a little wasteful.</div><div><br></div><div>Digging through the documentation I can't seem to find a way of using rewrite without blowing away/not capturing the current URI.</div>
</div></blockquote></div><pre class="line-pre"><div class="line" id="file-nginx-conf-LC12"><span class="kn">location</span> <span class="p">~</span> <span class="sr">"^/[a-f0-9]</span><span class="p">{</span><span class="kn">16}/(css|js)/(.+)"</span> <span class="p">{</span></div><div class="line" id="file-nginx-conf-LC13"> <span class="kn">expires</span> <span class="s">30d</span><span class="p">;</span></div><div class="line" id="file-nginx-conf-LC14">  alias  /path/to<span class="s">/</span><span class="nv">$1/$2</span><span class="p">;</span></div><div class="line" id="file-nginx-conf-LC15"><span class="p">}</span></div></pre><div><br></div><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><br>--   <br>Igor Sysoev<br><a href="http://nginx.com">http://nginx.com</a></div></div>
</div>
<br></body></html>