Thanks, why wouldn&#39;t you do a location rewrite? What&#39;s the advantage of using the sub / subs module?<br><br><div class="gmail_quote">On Sat, Jan 8, 2011 at 2:36 PM, Ryan Malayter <span dir="ltr">&lt;<a href="mailto:malayter@gmail.com">malayter@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Sat, Jan 8, 2011 at 8:52 AM, Ilan Berkner &lt;<a href="mailto:iberkner@gmail.com">iberkner@gmail.com</a>&gt; wrote:<br>

&gt;<br>
&gt; Thanks for the details, once I realized the difference, going directly to the CDN is the whole point.<br>
&gt; Rackspace has an interesting product which combines storage + CDN so for us that kind solution may work well, but we&#39;re still exploring.<br>
&gt; Thanks<br>
<br>
</div>Don&#39;t forget the sub_filter module:<br>
<a href="http://wiki.nginx.org/HttpSubModule" target="_blank">http://wiki.nginx.org/HttpSubModule</a><br>
<br>
or the third-party subs_filter which can handle regex:<br>
<a href="http://wiki.nginx.org/HttpSubsModule" target="_blank">http://wiki.nginx.org/HttpSubsModule</a><br>
<br>
We&#39;ve used the former to test a CDN without modifying any application<br>
code or application configuration and without doing HTTP redirects.<br>
<br>
In your case something like this might help (assuming you keep the<br>
same path structure on the CDN as your site, or you are using origin<br>
fetch mode):<br>
    sub_filter      &#39;<a href="http://www.ourdomain.com/sounds" target="_blank">www.ourdomain.com/sounds</a>&#39;&#39;<br>
&#39;<a href="http://mybucket.cdndomain.com/sounds/" target="_blank">mybucket.cdndomain.com/sounds/</a>&#39;;<br>
    sub_filter_once off;<br>
<br>
If you need to do regex or multiple rules in a location, you&#39;ll need<br>
the thrid-party subs_filter instead of the built-in sub_filter.<br>
<font color="#888888"><br>
--<br>
RPM<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br>