Hi, I would like to prepare sorry page in iRule. I want to display sorry page only for IP address from internet. Below you can find iRule prepared so far:
when HTTP_REQUEST {
if { not ([class match [IP::client_addr] equals LOCAL_NET]) } {
HTTP::respond 200 content {
Service is not working.
} Cache-Control No-Cache Pragma No-Cache
}
}
Problem is that in polices I got some redirect statements, and when IP address is not in IP data group I’m receiving “Multiple redirect/respond invocations not allowed”.
Is there some kind of possibility to stop processing Polices after condition from iRule?
You could try adding a policy on top to redirect the external users to a local page implemented using iFiles. It seems like a good option, I’ve done this in past for a customer who was trying to implement error messages using complex HTML pages with images and css files. Reference: DevCentral - An F5 Technical Community
Another option to consider is to add an exception condition in your redirect policies for the external users, leaving then the respond event free to be thrown by iRule.