There are few ways you can detect Iphone Device, and tell browser to behave accordingly. The iPhone launched with this user agent:
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3
Todetect User Agent
Using ASP codeFor those on a Windows Server, create a file called user-agent.asp and put the following lines of code in:
<%
Response.Write Request.ServerVariables (“HTTP_USER_AGENT”)
%>Using PHP Code For those on Linux based servers
<?php