iyanus_39384
Dec 01, 2010Nimbostratus
Outbound iRule STREAM Rewrites for CDN
Hi Folks,
We have a legacy app that has a lot of static content that we want to move to a CDN. I have succesfully created a stream profile to do some of the outbound translation, however this is a lot of management overhead as each asset has to have an explicit source/dest rewrite string pair. Ideally I'd like to do it programatically.
What I am trying to to is rewrite outbound HTTP responses with string replacement of the form
search1: src="/path/to/static/asset.[jpg,gif,png,swf]"
replace1: src="http://my.cdn/path/to/static/asset.[jpg,gif,png,swf]"
I know it sounds easy but I am having major grief getting an iRule to work.
I have tried messing about with STREAM::expression and STREAM::replace but I can't seem to get my regexps to work.
Any Ideas?
Iain