block robots for some urls

bvidinli bvidinli at gmail.com
Thu Jul 15 02:51:36 MSD 2010


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,

what I am doing wrong ?



More information about the nginx mailing list