Hi Johnson,
I wonder if you could check for [active_members [LB::server pool]] == 0 in CLIENT_ACCEPTED. If it is true, then collect the TCP payload with TCP::collect, replace all of it with TCP::payload replace and then select a new destination IP:port with the node command. Here are the wiki pages for the related commands:
http://devcentral.f5.com/wiki/default.aspx/iRules/lb__server
http://devcentral.f5.com/wiki/default.aspx/iRules/active_members
http://devcentral.f5.com/wiki/default.aspx/iRules/tcp__collect
http://devcentral.f5.com/wiki/default.aspx/iRules/tcp__payload
http://devcentral.f5.com/wiki/default.aspx/iRules/node
Aaron