location / {
if ($http_user_agent ~* "Windows NT 5.1") {
return 444;
}
}
MacBook-Pro:~ louis$ curl -I -A "Windows NT 5.2" hao.123.com/00132233423434
HTTP/1.1 302 Found
Server: gws
Date: Thu, 09 Jul 2015 15:46:07 GMT
Content-Type: text/html
Content-Length: 254
Connection: keep-alive
Keep-Alive: timeout=60
Location: http://hao.123.com/
MacBook-Pro:~ louis$ curl -I -A "Windows NT 5.2" hao.123.com/
HTTP/1.1 200 OK
Server: gws
Date: Thu, 09 Jul 2015 15:47:09 GMT
Content-Type: text/html
Content-Length: 29792
Last-Modified: Thu, 09 Jul 2015 13:20:05 GMT
Connection: keep-alive
Keep-Alive: timeout=60
ETag: "559e7505-7460"
Accept-Ranges: bytes
1
holinhot OP 不知道刚刚哪弄错了现在又工作了
location / { if ($http_user_agent ~* "Windows NT 5.2") { return 444; } } |
2
holinhot OP 无语了 把5.1 xp搞错
|
3
holinhot OP hehe
242.119.21.11 - - [09/Jul/2015:12:01:20 -0400] "GET /bxiwn.gif HTTP/1.1" 444 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; );" 244.229.10.82 - - [09/Jul/2015:12:01:21 -0400] "GET /nrgnpjei.htm HTTP/1.1" 444 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; );" |