Forum Discussion
hooleylist
Sep 09, 2013Cirrostratus
Hi Joe,
You should be able to escape the []'s in the variable and then use subst to substitute the command with the command value.
Also, change all the variables you set in RULE_INIT to static:: to preserve CMP compatibility
http://www.tcl.tk/man/tcl8.4/TclCmd/subst.htm https://devcentral.f5.com/wiki/iRules.CMPCompatibility.ashx
when RULE_INIT {
...
set static::error_url {http://[HTTP::host]/404.aspx}
...
}
when HTTP_REQUEST {
...
HTTP::respond 302 "Location" [subst $static::error_url] Cache-Control No-Cache Pragma No-Cache
...
}
Aaron