Forum Discussion
sandy16
Altostratus
Mar 03, 2016Want to display a maintenance page from the F5 using ifile + irule and no cache.
Hi experts, we are running ver 11.5.1 hf3 on our LTMs. I am using the ifile feature to send out a maintenance page by using the below irule -
when HTTP_REQUEST {
if { [active_members [LB::serv...
Vernon_97235
Mar 03, 2016Historic F5 Account
HTTP::header insert in the HTTP_REQUEST event inserts the headers in the request before passing the request to the forwarding target (generally a pool member). Since you are not passing the request along, that's not quite what you want.
The HTTP::respond command allows you to insert headers directly on the response:
when HTTP_REQUEST {
if { [active_members [LB::server pool]] < 1 } {
HTTP::respond 200 content "[ifile get MY-HTML-IFILE]" noserver "Cache-Control" "no-store, no-cache"
}
}
sandy16
Altostratus
Mar 03, 2016Thanks... that works !! You are bang on target !!
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