You can also turn that into a regex location (or location with captures in 0.7) and take it out of the main location block.  I am not 100% sure, but my intuition tells me that the location block performs much (well, at least a little) better than the if block.  It looks cleaner, anyway :).<br>
<br>- Merlin<br><br><div class="gmail_quote">On Thu, Mar 19, 2009 at 11:26 AM, Nick Pearson <span dir="ltr">&lt;<a href="mailto:nick.pearson@gmail.com">nick.pearson@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Here&#39;s a simplified version of I use the following to accomplish this, inside my location block:<br><br>if ($uri ~* (\.css|\.js|\.ico|\.gif|\.jpg|\.png)) {<br>  break;<br>}<br><br>Note that I haven&#39;t tested this simplified form directly, but I believe it should work.<div>
<div></div><div class="h5"><br>
<br><div class="gmail_quote">On Thu, Mar 19, 2009 at 1:14 PM, Marcelo Barbudas <span dir="ltr">&lt;<a href="mailto:nostef@gmail.com" target="_blank">nostef@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi,<br>
<br>
I have a setup where I am using nginx with RubyOnRails.<br>
<br>
The setup looks simple:<br>
if (!-f $request_filename) {<br>
  proxy_pass <a href="http://domain1" target="_blank">http://domain1</a>;<br>
  break;<br>
}<br>
<br>
However I have a directory that holds images that sometimes get deleted.<br>
People keep linking to those images and the 404s go to the rails process.<br>
<br>
How can I tell nginx that any request towards:<br>
/images/subassets/*.gif<br>
should never be forwarded to rails?<br>
<br>
--<br>
Cheers,<br>
<font color="#888888">M.<br>
<br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>