Try this rule
#5#~#True#~#(.*)(/jquery/[\d.]+/)(.*)#~#libs\2\3#~#False#~#True
No. It's a wrong rule. Try this:
#5#~#True#~#.*/jquery\.js\?ver=([\d.]+)$#~#ajax.googleapis.com/ajax/libs/jquery/\1/jquery.min.js#~#False#~#True
thanks
DenZzz solution is almost there.. with little edit.
add \ backslash before dot in [\d\.] and add http://
#5#~#True#~#.*/jquery\.js\?ver=([\d\.]+)$#~#http://ajax.googleapis.com/ajax/libs/jquery/\1/jquery.min.js#~#True#~#Truethank you very much, if i got rules for other jquery url format, or other js library (jqueryui etc), I will post here.
note: this works in redirect, not url transforming.
Posted on: 01 December 2011, 16:57:43
Ask again:
site hosted WordPress.com has URL like this
http://s1.wp.com/wp-includes/js/jquery/jquery.js?m=1322588680g&&ver=1.7.1
how to strip
m=1322588680g&This regex does not work:
.*/jquery\.js\?([a-z0-9=;\&\#]+)?ver=([\d\.]+)$rule format:
#5#~#True#~#.*/jquery\.js\?([a-z0-9=;\&\#]+)?ver=([\d\.]+)$#~#http://ajax.googleapis.com/ajax/libs/jquery/\2/jquery.min.js#~#True#~#True
Whereas the practice says no error in that expression:
0(1): http://s1.wp.com/wp-includes/js/jquery/jquery.js?m=1322588680g&ver=1.7.1
1(50): m=1322588680g&
2(73): 1.7.1
--------- After -- replacement ----------
Mark: