Reputation: 1
I'm running Apache2 on Debian 5. I only want it to redirect when someone visits a certain page. Maybe something in JavaScript?
Upvotes: 0
Views: 641
Reputation: 171
You would redirect based on the User Agent. Doing this in JavaScript is possible, however, it would mean the iPhone visitor would have to load the full size page before getting redirected. Another approach would be to handle the redirecting in Apache with mod_rewrite.
Here are a few links that would allow you to accomplish what you're looking for.
Upvotes: 0
Reputation: 2377
You could take advantage of the User Agent string:
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
Upvotes: 1