I have a mobile site and I\'d like to redirect users to the domain.mobi or mobile.subdomain (we have both setup)
There are a number of solutions for determining mobile browsers. Most use the UserAgent making the request but some solutions use other factors as well.
Try looking at:
WURFL
MDBF
DeviceAtlas
DetectRight
Volantis
MobileAware
Movila
UAProf