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