Multiple dns entries will help do this quite well, actually. While this won't ALWAYS redirect traffic like you requested, it will actually do a pretty good job.
WHMCS Guru - WHMCS addons, management, support and more. WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
Linux Problems? WHMCS Issues? +1-866-546-8914 (linux-14) or @whmcsguru on twitter!