adharkrader
Feb 09, 2016Nimbostratus
How can I have [variables] evaluated in a string?
After many rounds of tweaking our redirector iRule, I'd like to make it so the folks thinking up "add this, add that" can add their own information on the redirect by modifying the redirect target string. Currently, I'm using regsub to replace [HTTP::host], [HTTP::uri], etc but then I have to add another regsub every time they want something different.
Is there a way to have the target string eval-ed and the [variables] resolved directly? I tried "eval {log local0. $redirect_target}" as a test but the [vars] in the string come through as [vars] instead of being resolved. Is there a way to get them resolved on-the-fly?
Thanks - Al