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.
Joel_Moses
Nimbostratus
May 13, 2013Seconded with Spark. I always use [subst -nobackslashes [ifile get ifile_name]] for this purpose. It works just fine for dynamically replacing the variables and commands into the page text that you've stored in the iFile.
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