Sigh. Yeah, I think most Blackberries either have javascript disabled or don't have it at all. I'll try a server-side solution - I think there's a PHP page I can get to to put an all-purpose redirect on.
Speaking of which, do you (or does anyone) know some good code for that? I've found a few solutions - one is to stick something like this in the .htaccess file:
1.#redirect mobile browsers
2.RewriteCond %{HTTP_USER_AGENT} .iPhone.$
3.RewriteRule (.)$ http://mobile.yourdomain.com [R=301]
4.RewriteCond %{HTTP_USER_AGENT} .BlackBerry.$
5.RewriteRule (.)$ http://mobile.yourdomain.com [R=301]
6.RewriteCond %{HTTP_USER_AGENT} .Palm.$
7.RewriteRule (.*)$ http://mobile.yourdomain.com [R=301]
or put something like this in a destination PHP page:
<?php
$mobile = “YOUR MOBILE SITE HERE”;
$text = $_SERVER['HTTP_USER_AGENT'];
$var[0] = ‘Mozilla/4.’;
$var[1] = ‘Mozilla/3.0′;
$var[2] = ‘AvantGo’;
$var[3] = ‘ProxiNet’;
...and so forth with more variable strings for various useragents then...
$result = count($var);
for ($i=0;$i<$result;$i++)
{
$ausg = stristr($text, $var[$i]);
if(strlen($ausg)>0)
{
header(“location: $mobile”);
echo ‘<BR>mobile device detected<BR>’;
break;
}
}
?>
Which solution is better? Or is there some other way?
Thanks!