作者winstonw (ww)
看板Network
标题Re: [问题] firefox开网页
时间Tue Aug 26 01:05:47 2008
※ 引述《xsoho (当兵中....)》之铭言:
: 我用firefox开 http://www.keepon.com.tw/ 结果网址会显示成
: http://www.keepon.com.tw/htmldata -找不到这个页面
: 但若用IE开却没有问题,请问为什麽会这样?
这似乎是 server 端或是网页程式上刻意作的,当 client 是 IE 时,就喂出 default.asp
如果不是,就会重导到 /htmldata 这个不存在的 URL
◎ 用 wget 去抓网页,送出 IE 的 agent string,可以抓到网页:
wget -U "Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)" '
http://www.keepon.com.tw/'
--2008-08-26 01:03:21--
http://www.keepon.com.tw/
Resolving www.keepon.com.tw... 59.120.215.226
Connecting to www.keepon.com.tw|59.120.215.226|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 108378 (106K) [text/html]
Saving to: `index.html'
100%[=======================================================================================>] 108,378 91.8K/s in 1.2s
2008-08-26 01:03:23 (91.8 KB/s) - `index.html' saved [108378/108378]
◎ 当 wget 的 agent string 被指定为 Firefox 的时,就会重导到 htmldata,然後档案不存在所以得到个 404
wget -U "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16" '
http://www.keepon.com.tw/'
--2008-08-26 01:02:48--
http://www.keepon.com.tw/
Resolving www.keepon.com.tw... 59.120.215.226
Connecting to www.keepon.com.tw|59.120.215.226|:80... connected.
HTTP request sent, awaiting response... 302 Object moved
Location:
http://www.keepon.com.tw/htmldata [following]
--2008-08-26 01:02:48--
http://www.keepon.com.tw/htmldata
Reusing existing connection to www.keepon.com.tw:80.
HTTP request sent, awaiting response... 404 Not Found
2008-08-26 01:02:48 ERROR 404: Not Found.
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.117.191.250