If you want to detect Ipad and Iphone browser then following snippet will help you to redirect users to new page specifically designed for Iphone or Ipad devices.

PHP Ipad detection code

[PHP] if(strstr($_SERVER['HTTP_USER_AGENT'],"iPad"))
{
header("Location: http://ipad.yourdomain.com");
}
?>
[/php]

PHP Iphone detection code

[PHP] if(strstr($_SERVER['HTTP_USER_AGENT'],"iPhone"))
{
header("Location: http://iphone.yourdomain.com");
}
?>
[/php]