On Sat, Aug 14, 2010 at 12:01 PM, Edho P Arief <span dir="ltr">&lt;<a href="mailto:edhoprima@gmail.com" target="_blank">edhoprima@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



<div>On Sun, Aug 15, 2010 at 1:49 AM, kevin &lt;<a href="mailto:kevincastiglione@gmail.com" target="_blank">kevincastiglione@gmail.com</a>&gt; wrote:<br>
&gt; On Sat, Aug 14, 2010 at 11:42 AM, kevin &lt;<a href="mailto:kevincastiglione@gmail.com" target="_blank">kevincastiglione@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Sat, Aug 14, 2010 at 10:07 AM, Igor Sysoev &lt;<a href="mailto:igor@sysoev.ru" target="_blank">igor@sysoev.ru</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Fri, Aug 13, 2010 at 07:43:58PM -0700, kevin wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt; requests like these are hitting my server, and i want to catch these<br>
&gt;&gt;&gt; &gt; requests, and return &#39;not found&#39; from nginx. i dont want it to hit my<br>
&gt;&gt;&gt; &gt; fastcgi backend.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; [13/Aug/2010:19:39:26 -0700]  &quot;POST /%5C%22http:%5C/%5C/<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; <a href="http://photos-b.ak.fbcdn.net" target="_blank">photos-b.ak.fbcdn.net</a>%5C/photos-ak-snc1%5C/v43%5C/64%5C/68931197560%5C/app_2_68931197560_3211.gif%5C%22<br>
&gt;&gt;&gt; &gt; HTTP/1.1&quot; 404 103 &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5;<br>
&gt;&gt;&gt; &gt; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8&quot; 0.087 US<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; how do i match requests with url starting like this:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; /%5C%22http:%5C/%5C/<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Try<br>
&gt;&gt;&gt;   location /\&quot;http:\/\/ {<br>
&gt;<br>
&gt; I tried this, but did not help<br>
&gt;<br>
&gt;         location /\&quot;http:\/\/ {<br>
&gt;             access_log logs/junk.log wtop;<br>
&gt;             rewrite ^/(.*) <a href="http://www.XXX.com" target="_blank">www.XXX.com</a> permanent;<br>
&gt;         }<br>
&gt;<br>
&gt;<br>
&gt; it does not catch it. it is still hitting my fastcgi backend<br>
&gt;<br>
<br>
</div>put it in the topmost of your server block.<br></blockquote><div>yes i have it in the top most position in server block. all other location sections are below this and it still does not catch it. it is going to the location that matches the last block <br>


location / {<br></div></div>