Forum Discussion
GavinW_29074
Jan 16, 2012Nimbostratus
Catch specific SSL errors/failures???
Hi there
One of the requirements that I've been given is to try and catch certain SSL errors and return a more friendly error page, rather than the browser default...
A couple of ...
hooleylist
Jan 18, 2012Cirrostratus
Sorry, $failure_result is calculated at runtime, so your solution of calling subst at runtime is perfect. You should be able to get the ifile contents in RULE_INIT using 'set static::error_page [ifile get error_page_html]' and then call subt against that with HTTP::respond:
HTTP::respond 403 content [subst $static::error_page] "Content-Type" "text/html" "Connection" "Close"
The advantage to doing this is that you're only loading the ifile once at load time instead of every request. I assume this is more efficient, but haven't tested it before. If you wanted to, you could enable timing on the iRule with the two different iRule versions and make a batch of requests to compare.
http://devcentral.f5.com/wiki/iRules.timing.ashx
Aaron
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