Why would you want to do that? With Javascript you can detect different browsers and work in accordance....
https://stackoverflow.com/a/5918791/3617531
EDIT
Anyway, you can check the UserAgent in apache:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (OneMobileUserAgent|AnotherUserAgent|...)
RewriteRule (.*) userAgentA/$1
EDIT 2
Just found a good web with lots of info about the user agent and parsing it. Hope it may help you yo find your ideal solution:
https://developer.jboss.org/thread/177392?_sscc=t
EDIT 3
As you commented: I´ll try to explain twe two first methods (javascript) and Apache.
Javascript has a system for querying HTTP HEADERS. One of them is the USER_AGENT the client send this header to indentify itselfs. This is obviously used to format webs according to the browser, or to show messages that tell the user to use another browser to see the page.
The user agent is easily detected in javasript with the navigator.userAgent variable you can check. Here you can read more about
http://en.wikipedia.org/wiki/User_agent
Also, Apache can check the HTTP_USER_AGENT variable that will be checked in your .htaccess
The .htaccess is a file that will tell apache how to run in a particular directory. There, yoy must use the module "mod_rewrite" that lets you make apache act as a proxy, and then, for example, deny the conection depending on the userAgent detected:
RewriteEngine On
//allow access to useragentA
RewriteCond %{HTTP_USER_AGENT} UserAgentA
//This line will redirect the user to http://yourdomain.com/webappForuserAgentA
RewriteRule (.*) webappForuserAgentA/$1 [P,R,L]
//Deny (F) access to userAgentB (it will give the error to the client with the wrong browser
RewriteCond %{HTTP_USER_AGENT} UserAgentB
RewriteRule ^.* - [F,L]
There you have a guide for .htaccess mod_rewrite with apache.
http://www.javascriptkit.com/howto/htaccess13.shtml