vocaliu / chrome-redirector

Automatically exported from code.google.com/p/chrome-redirector
GNU General Public License v3.0
0 stars 0 forks source link

[RULE] 多次重定向 #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Twitter / tualatrix: Evernote 5 for iPhone, iPad ... 
https://twitter.com/tualatrix/statuses/266137551994253314

这条 Twitter 中的 youtu.be/6PdY1c_C-Qk 
我这需要两次重定向到 https 才能正常访问到。

1、http://(.*)?youtu.be/(.*) 正则

2、http://*.youtube.com/* 通配符

替换都是http>https

现在无法连续重定向,这两条规则能否合并?

Original issue reported on code.google.com by rpzrpz...@gmail.com on 8 Nov 2012 at 6:03

GoogleCodeExporter commented 9 years ago
合并成一条
http://(.*)?youtu.?be(.com)?/(.*)
依然要两次

Original comment by rpzrpz...@gmail.com on 8 Nov 2012 at 6:08

GoogleCodeExporter commented 9 years ago
这样可以吗:

Match: ^https?://youtu.be/
Subst: ^https?://youtu.be/(.*)
Repl : https://www.youtube.com/watch?v=$1&feature=youtu.be

如果无法预测服务器端的重定向规律,则无法合并。

Original comment by CyrilF...@gmail.com on 8 Nov 2012 at 9:55

GoogleCodeExporter commented 9 years ago
多谢,成功了。

Original comment by rpzrpz...@gmail.com on 8 Nov 2012 at 10:00

GoogleCodeExporter commented 9 years ago

Original comment by CyrilF...@gmail.com on 8 Nov 2012 at 10:01