Forum Discussion
jcline
Nimbostratus
Jun 26, 2019I'm trying to create an irule that will quickly redirect traffic that meets a URI and IP address list and send them to an ifile.
The rule works but it is slow to push traffic to the page about 45 seconds and some browsers are caching the page and not coming back to the original page when rule is removed. What is the best way ...
jcline
Nimbostratus
Jun 27, 2019Thanks for the reply JG.
Your rule didn't work for me. I was able to get the cache working a little better with the rule below.
My biggest problem now is I have test clients running Chrome that have a session to the resource and are unwilling to give it up and take my iFile page.
This one has the best response for caching the ifile for me but it's still not what I'd like it to be on all browsers. IE works perfect but Chrome loves its cache and likes to keep it's sessions opened.
when HTTP_REQUEST {
set net_code [class match -value -- [IP::client_addr] equals internal_network_dg]
set app_path [class match -value -- [string tolower [HTTP::path]] starts_with maintenance-page-path-dg]
if {$app_path eq "m" and $net_code ne "r"} {
HTTP::respond 307 content [ifile get HighTraffic.html] "Content-Type" "text/html" { HTTP::header replace "Cache-Control: max-age=0, no-cache" } }
}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
