123.125.66.93 - - [02/Sep/2009:12:04:58 +0800] "GET /19/wdy999/ HTTP/1.1" 302 - "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
220.181.7.63 - - [02/Sep/2009:12:05:04 +0800] "GET /7/zikao365all_zikao365/ HTTP/1.1" 302 - "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
123.125.66.66 - - [02/Sep/2009:12:05:11 +0800] "GET /19/xujingui_chinalawedu/ HTTP/1.1" 302 - "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
220.181.7.85 - - [02/Sep/2009:12:05:16 +0800] "GET / HTTP/1.1" 200 147599 "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
123.125.66.120 - - [02/Sep/2009:12:05:25 +0800] "GET /2/CPA5752/ HTTP/1.1" 302 - "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
123.125.66.86 - - [02/Sep/2009:12:05:38 +0800] "GET /2/XL650526/ HTTP/1.1" 302 - "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
123.125.66.21 - - [02/Sep/2009:12:05:50 +0800] "GET / HTTP/1.1" 200 147599 "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
123.125.66.122 - - [02/Sep/2009:12:05:51 +0800] "GET /2/baiyalan/ HTTP/1.1" 302 - "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
123.125.66.74 - - [02/Sep/2009:12:06:03 +0800] "GET /2/dongyueying/ HTTP/1.1" 302 - "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
123.125.66.83 - - [02/Sep/2009:12:06:14 +0800] "GET /2/lbaoqin1234/ HTTP/1.1" 302 - "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm)"
发现baidu spider 仍然抓取的url地址为 /19/wdy999/ 而我们使用php header函数转到了 /wdy999/这样的地址上
所以猜测:对于百度搜索引擎蜘蛛baidu spider 对302 仍然可以抓取到文章,但是对于url的收录仍然收录的是旧URL地址 /19/wdy999/
优化方法: 使用header("Location: /foo.php",TRUE,301);
header("Location: /foo.php",TRUE,301);
header("Location: /foo.php",TRUE,302);
header("Location: /foo.php");
header("Location: /foo.php",TRUE,303);
header("Location: /foo.php",TRUE,307);
?>