创建个httphandle在配置文件中配置要防盗链的类型,在handle里判断请求的域名是否是你想要的不就行了
http://www.google.com.hk/custom?domains=cnblogs.com&q=%E9%98%B2%E7%9B%97%E9%93%BE&sitesearch=cnblogs.com&client=pub-4210569241504288&forid=1&channel=5875741252&ie=UTF-8&oe=UTF-8&safe=active&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3AFFFFFF%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BLH%3A50%3BLW%3A129%3BL%3Ahttp%3A%2F%2Fwww.cnblogs.com%2Fimages%2Flogo_small.gif%3BS%3Ahttp%3A%2F%2Fwww.cnblogs.com%2F%3BFORID%3A1&hl=zh-CN