JamesCrk I believe what you are looking for is a sideband but instead of doing that you might consider using a GTM or other GSLB to balance the DNS query for you instead of configuring a complicated iRule.
https://clouddocs.f5.com/api/irules/SIDEBAND.html