Macintosh UserAgents looks like something like this : Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
As far as I know, RewriteCond %{HTTP_USER_AGENT}
will look for the regular expression you gave him. In the mentioned case, if he finds iPhone
in the User-Agent, the condition test will return true. So it should be possible to do something like this :
RewriteCond %{HTTP_USER_AGENT} Macintosh
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^ http://mac.example.com%{REQUEST_URI} [R]
Hope this works, and hope this helps :)