atom feed5 messages in ru.sysoev.nginxRe: block robots for some urls
FromSent OnAttachments
bvidinliJul 14, 2010 3:51 pm 
toto2008Jul 18, 2010 2:33 pm 
Nuno MagalhãesJul 18, 2010 2:41 pm 
bvidinliJul 18, 2010 4:40 pm 
Igor SysoevJul 19, 2010 4:50 am 
Subject:Re: block robots for some urls
From:Igor Sysoev (ig@sysoev.ru)
Date:Jul 19, 2010 4:50:01 am
List:ru.sysoev.nginx

On Thu, Jul 15, 2010 at 01:51:36AM +0300, bvidinli wrote:

Hi,

I want to block some robots such as google, to access some urls.

here is my config:

# robotlarin gezdigi luzumsuz adresleri blokla... zirt pirt giriyorlar sanki bisey varmis gibi set $test "";

if ($request_filename ~* calendar) { set $test "blo"; }

if ($http_user_agent ~* google\.com ) { set $test "${test}ck1"; }

if ($test = "block1" ){ return 444; }

this is as described in nginx config, for "and" ing some conditions. but, it do not work now,

location ~ calendar { if ($http_user_agent ~* google\.com ) { return 444; }