- 论坛徽章:
- 0
|
要求:在IE中输入一个ip地址,如:192.168.1.1 ,那么显示出某个指定网址,如www.sina.com.cn的内容。
我现在在服务器的HTTP代理程序上做了如下的,修改就是
把http的头部中的GET 中192.168.1.1转换成www.sina.com.cn
把http的头部中的Host 中的192.168.1.1转换成www.sina.com.cn
其他的不做更改。可是还是不能显示出正常的页面。
======================================
输入www.sina.com.cn时候,提交的HTTP的头部是:
[GET http://www.sina.com.cn/ HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: zh-cn
Proxy-Connection: Keep-Alive
If-Modified-Since: Fri, 16 Mar 2007 05:48:30 GMT; length=257182
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: www.sina.com.cn
Cookie: SINAGLOBAL=218.18.133.53.272411166426406221; SINA_NEWS_CUSTOMIZE_city=%u6DF1%u5733; SINA_SPUSER=wanghi9394; FINA_VISITED_S=sh600601|XR方正科; sinadl_1_1=1174027993859; s_dl=-1; sinadl_1_2=1174016826312
]
输入192.168.1.1时候,提交的HTTP的头部是:(修改前)
[GET http://12.3.4.177/ HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: zh-cn
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: 12.3.4.177
Proxy-Connection: Keep-Alive
]
而且服务器的HTTP代理程序的log里面也记录了输入192.168.1.1时候,只是能返回一些新浪网页头部的数据
应该如何修改才是正确的呢?
[ 本帖最后由 wanghi 于 2007-3-16 16:25 编辑 ] |
|