0

我有一个joomla网站,

  1. 我正在为它制作一个移动网站。
  2. 我希望移动网站有一个“完整网站”选项。

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 模板。而且我不想使用移动 joomla。我也没有使用htaccess的经验谢谢

4

2 回答 2

1

你可以通过一个js文件来制作它。

访问此站点,并选择正确的方法: http ://detectmobilebrowsers.com/

你有很多选择,你只选择你需要/喜欢的一个。

于 2013-07-25T10:04:45.697 回答
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/');
}

?>
于 2013-07-25T09:23:35.463 回答