zbirmingham
Nov 17, 2011Nimbostratus
iRule redirect via Geolocation
I'm looking to implement an iRule that leverages geolocation to redirect certain traffic from specific states. Since we leverage a CDN, I will need to use the X-Forwarded-For field for the incoming IP addresses. Below is my 1st attempt at the iRule. Will this work with the BigIP's Quova module?
when CLIENT_ACCEPTED {
if { !(([whereis [HTTP::header values "X-Forwarded-For"] abbrev] equals "MO") or ([whereis [HTTP::header values "X-Forwarded-For"] abbrev] equals "IL")) } {
HTTP::redirect "http://www.example.com/
}
}