yönlendirmeyi asp ile yapabilirsin.. php fazla bilgim yok unuttum
<%
response.buffer=true
If InStr(Request.ServerVariables("HTTP_USER_AGENT"), _
"Mozilla") Then
Response.Redirect "http://"&Request.ServerVariables("HTTP_HOST")&"/web"
else
response.redirect "http://"&Request.ServerVariables("HTTP_HOST")&"/wap"
end if
%>