Reputation: 1
I have a joomla website,
When I do this, the redirect kicks in again. So the mobile user clicks full site, and the full sure is loaded, which has the mobile redirect script, then they get sent back to the mobile site
.
Can you guys suggest what I should do?
Also,
So i need it to redirect to a sub folder, not a new joomla template. And I don't want to use mobile joomla. I also have no experience with htaccess Thanks
Upvotes: 0
Views: 244
Reputation: 372
you can make it by a js file.
go on this site, and choose the right method: http://detectmobilebrowsers.com/
you have a lot of choices, you choose the only one you need / prefer.
Upvotes: 1
Reputation: 453
You can do it using PHP. Try something like this :
<?php
$iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$android = strpos($_SERVER['HTTP_USER_AGENT'],"Android");
$palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS");
$berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
$ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod");
if ($iphone || $android || $palmpre || $ipod || $berry == true) {
header('Location: http://mobile.site.com/');
}
?>
Upvotes: 0