我有一个joomla网站,
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
的。
你们可以建议我应该做些什么吗?
另外,
所以我需要它重定向到子文件夹,而不是新的joomla模板。而且我不想使用移动joomla。 我也没有htaccess的经验 感谢
答案 0 :(得分:1)
答案 1 :(得分:0)
您可以使用PHP来完成。 尝试这样的事情:
<?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/');
}
?>