Forum Discussion
Brad_Otlin
May 08, 2013Ret. Employee
Reference an iRule variable in an HTML iFile response
I have a sorry page iRule that serves an html sorry page if no servers are left in the pool and serves another page if a 404 or 5xx is encountered. The 404/5xx portion of the irule tries each server...
- May 08, 2013I think the subst Tcl command is closest to what you want:
HTTP::respond 200 content [subst -nocommands -nobackslashes [ifile get error_html]]
Very clean, and much safer than using eval.
John_Alam_45640
Feb 29, 2016Historic F5 Account
Split page into two parts:
set ifile1 [ifile get down_html_part1]
set dynamic_part "today is wedenesday"
set ifile2 [ifile get down_html_part2]
set content "$ifile1$dynamic_part$ifile2"
HTTP::respond 200 content $content
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects