请教:关于operachina的链接跳转

新手入门、经验交流

Moderator: cre

Forum rules
  • 软件自带帮助是最好的入门教程,请仔细阅读;在您掌握最基本知识前,我们没法帮助您
  • 提问前请先查阅软件帮助文件和论坛相关讨论
  • 查阅软件帮助和论坛相关讨论即可解决的问题帖将直接删除,以免浪费他人时间
  • 请学会如何提问,尽量将问题描述清楚,不明确的提问将被直接删除
Post Reply
不夜侯
Posts: 101
Joined: Jul 29 2009, 16:22

请教:关于operachina的链接跳转

Post 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
2011-08-15_214120.jpg (28.58 KiB) Viewed 7349 times
User avatar
phoenix
Site Admin
Posts: 529
Joined: Dec 29 2007, 16:27

Re: 请教:关于operachina的链接跳转

Post 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/
不夜侯
Posts: 101
Joined: Jul 29 2009, 16:22

Re: 请教:关于operachina的链接跳转

Post by 不夜侯 »

谢谢,还是老老实实修改hosts 文件算了。
ddbb
Moderator
Posts: 425
Joined: Jan 07 2008, 13:30

Re: 请教:关于operachina的链接跳转

Post by ddbb »

我觉得这里应该用$RDIR 而不是$JUMP 吧
User avatar
phoenix
Site Admin
Posts: 529
Joined: Dec 29 2007, 16:27

Re: 请教:关于operachina的链接跳转

Post by phoenix »

ddbb wrote:我觉得这里应该用$RDIR 而不是$JUMP 吧
对服务器来说没有区别。
Post Reply