Forum Discussion
Peter_Degrassi_
Dec 08, 2006Historic F5 Account
HTTP redirect with monitor
Hi,
I have an IRule that redirects HTTP requests based on the source IP of the request. I'd like to add a check to ensure that the re-direct site is up before redirecting. I'm considering using "LB::status" for this but I'm not sure where to insert it into the rule. Here's my current rule...
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals 10.1.3.0/255.255.255.0] } {
HTTP::redirect "http://10.1.4.11/"
}
}
So I want the redirection to occur only if the client address matches AND the site at 10.1.4.11 is up. Of course I would have to put the server in a pool and assign a monitor.
Any pointers?
Thanks
- hoolio
Cirrostratus
Hello, - Peter_Degrassi_Historic F5 AccountI can't seem to get the syntax correct. How should I construct the iRule? Where do I put the LB::status check so it performs a logical AND with the client IP check? I'm a newb so dumb it down as much as possible. :-)
- Peter_Degrassi_Historic F5 AccountThanks Aaron, that worked great!
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