Page 1 of 1
请教:关于operachina的链接跳转
Posted: Aug 15 2011, 22:09
by 不夜侯
由于operachina不能正常访问,想利用proxo制订一规则实现访问。
Code: Select all
[HTTP headers]
In = FALSE
Out = TRUE
Key = "URL:operachina (out)"
Match = "http://[^/]++.operachina.com/\1"
Replace = "$JUMP(http://59.151.106.253/\1)"
但实际地址多了很多
mobile,请问是什么原因?谢谢!
- 2011-08-15_214120.jpg (28.58 KiB) Viewed 7352 times
Re: 请教:关于operachina的链接跳转
Posted: Aug 15 2011, 23:50
by phoenix
因为直接用ip地址访问,服务器会返回域名形式的 302:Location:
http://www.operachina.com/mobile/
返回的地址被规则匹配,转换为ip地址,又被服务器返回域名形式的 302 ,如此往复,直到 opera 放弃尝试。
Code: Select all
+++GET 696+++
GET / HTTP/1.1
User-Agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.50
Host: 59.151.106.253
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en,zh-CN;q=0.9,zh;q=0.8
Accept-Encoding: gzip, deflate
Cache-Control: no-cache
Connection: keep-alive
+++RESP 696+++
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Mon, 15 Aug 2011 15:45:57 GMT
Content-Type: text/html
Content-Length: 154
Connection: keep-alive
Location: http://www.operachina.com/mobile/
Re: 请教:关于operachina的链接跳转
Posted: Aug 16 2011, 21:35
by 不夜侯
谢谢,还是老老实实修改hosts 文件算了。
Re: 请教:关于operachina的链接跳转
Posted: Aug 17 2011, 11:59
by ddbb
我觉得这里应该用$RDIR 而不是$JUMP 吧
Re: 请教:关于operachina的链接跳转
Posted: Aug 17 2011, 21:53
by phoenix
ddbb wrote:我觉得这里应该用$RDIR 而不是$JUMP 吧
对服务器来说没有区别。