rewrite part of url

Is it possible to rewrite part of url, using a script?

http://www.webpagetest.org/result/140513_1E_D0E/1/details/

For example, in https://www.yahoo.com, there’s a resource https://s1.yimg.com/kx/yucs/uh3/uh/js/47/ai.min.js
I’d like to script the test so I can pull this resource from
https://ucs.zenfs.com/yucs/uh3/uh/js/47/ai.min.js

Sorry, nothing that fancy. It can do domain rewriting so you can have s1.yimg.com point to ucs.zenfs.com but you’d need the rest of the path to be the same.