
nginx
findmaven
http://www.findmaven.com-搜索Jar,搜索Maven
展开
-
设置nginx让baidu,google等爬虫抓取不同语言的页面
很多网站都有多语言版本,站长往往希望baidu爬虫爬中文页面,而google爬虫爬英文页面。于是,如果网站如以nginx做前端的话,站长往往会在nginx.conf中设置http头的accept-language,让爬虫重定向到指定语言页面进行抓取。但是事与愿违,google和baidu爬虫不设置http头的accept-language,导致爬虫抓取的是web.xml指定的默认页面。这样,baidu抓取中文页面,google抓取英文页面就无法同时达到。博主采用如下的方法同时实现上面的问题。原创 2014-02-22 13:12:29 · 2301 阅读 · 0 评论 -
nginx根据http请求头中的accept-language转发到不同的页面
nginx可以在nginx.conf中进行配置,根据http请求头中accept-language转发到不同的页面原创 2014-02-14 15:47:03 · 2407 阅读 · 0 评论