Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

iRule for internal and external traffic

want to send internal client to an internal website and send all other traffic to a customer website. Also Intercept an HTTP 404 message from a pool member and send the client an HTTP redirect instead

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

in this sample iRule your internal subnet is assumed 10.0.0.0/8.

when HTTP_REQUEST {
	if { [IP::addr [IP::client_addr]/8 equals 10.0.0.0] }
	{
		pool internal_pool
	} else {
		pool external_pool
	}
}
when HTTP_RESPONSE {
  if { [HTTP::status] == 404 } {
    HTTP::redirect "http://www.anothersite.com/Info.html"
 }
}

0