how to match these urls?

kevin kevincastiglione at gmail.com
Sat Aug 14 22:49:14 MSD 2010


On Sat, Aug 14, 2010 at 11:42 AM, kevin <kevincastiglione at gmail.com> wrote:

> On Sat, Aug 14, 2010 at 10:07 AM, Igor Sysoev <igor at sysoev.ru> wrote:
>
>> On Fri, Aug 13, 2010 at 07:43:58PM -0700, kevin wrote:
>>
>> > requests like these are hitting my server, and i want to catch these
>> > requests, and return 'not found' from nginx. i dont want it to hit my
>> > fastcgi backend.
>> >
>> > [13/Aug/2010:19:39:26 -0700]  "POST /%5C%22http:%5C/%5C/
>> > photos-b.ak.fbcdn.net
>> %5C/photos-ak-snc1%5C/v43%5C/64%5C/68931197560%5C/app_2_68931197560_3211.gif%5C%22
>> > HTTP/1.1" 404 103 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5;
>> > en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8" 0.087 US
>> >
>> >
>> > how do i match requests with url starting like this:
>> >
>> > /%5C%22http:%5C/%5C/
>>
>> Try
>>   location /\"http:\/\/ {
>>
> I tried this, but did not help

        location /\"http:\/\/ {
            access_log logs/junk.log wtop;
            rewrite ^/(.*) www.XXX.com permanent;
        }


it does not catch it. it is still hitting my fastcgi backend

81.192.X.X - - [14/Aug/2010:11:46:04 -0700]  "POST /%5C%22http:%5C/%5C/
photos-b.ak.fbcdn.net%5C/photos-ak-snc1%5C/v43%5C/240%5C/350031875244%5C/app_2_350031875244_2165.gif%5C%22
HTTP/1.1" 404 103 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr;
rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)
;ShopperReports" 0.084 MA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100814/3f95f485/attachment.html>


More information about the nginx mailing list