Craig_Gibb_1781
May 25, 2015Nimbostratus
Problems with string map and wildcard
Hi i need to replace a string av characters in a uri but only if the uri starts with the following:- /MacBlue_SAMTV/GetAttachmentDownloadInfo
I have tried to do this with the following irule:-
Check host and path for relevant link
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/MacBlue_SAMTV/GetAttachmentDownloadInfo" and [HTTP::uri]
contains "&encoding=TVOD_*_*" } {
Replace encoding with MPEG-4
string map { "encoding=TVOD_*_*" "&encoding=MPEG-4" "&encoding=TVOD_*_*" "&encoding=MPEG-4" } HTTP::uri }
}
This does not seem to work, it maybe the wildcards, any suggestions ? Would it be the best way to do this as regards performance.
/Craig