/    Sign up×
Community /Pin to ProfileBookmark

php mobile redirect script

I was hoping someone might help me edit this [URL=”http://www.pcmechanix.ca/mobile_redirect.htm”]mobile redirect code[/URL] so that it includes IPhones with the redirecting process.

Any suggestions?

FYI – Besides this minor exception, it is quite an effective code for redirecting mobile phones. You can try it for yourself, simply enter the following URL into your mobile:
[URL=”http://www.pcmechanix.ca”]http://www.pcmechanix.ca/[/URL]

Thanks,

Ash
Webmaster
[URL=”http://www.pcmechanix.ca”]PC MECHANIX – COMPUTER REPAIR SERVICES[/URL]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@PierceMooreJun 14.2009 — I just use the following javascript to redirect to my iPhone-optimized area:

[CODE]<script language=javascript>
<!--
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
{
location.href='http://iphone.refreshedweb.com';
}
-->
</script> [/CODE]


It works like a charm!


Pierce
×

Success!

Help @ashcares spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...