I am redesigning a site and I want to have it compatible with the IPad. Could someone show me the code in either JavaScript or PHP so that when someone comes to my site on an IPad they will be automatically redirected to a site that is narrower, contains no Flash graphics and the navigation system does not use mouseover flyouts?
Apple provides this useragent code:
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10
The code I need is to detect the IPad and then redirect the user to another webpage.
Thanks