Exemplo n.º 1
0
        //兼容性修复
        $uri = $_SERVER["HTTP_X_REWRITE_URL"];
        if ($uri == null) {
            $uri = $_SERVER["REQUEST_URI"];
        }
        $currentUrl = 'http://' . $_SERVER['HTTP_HOST'] . $uri;
        $model = new Mobile();
        $url = $model->getMobileUrl($currentUrl);
        header("Location:{$url}");
        //跳转到手机页面
        exit;
    }
}
//站点信息配置表
$sys_child_webid = 0;
$sys_webprefix = Helper_Archive::getSysWebprefix();
if (file_exists(SLINEDATA . '/weblist.php')) {
    require_once SLINEDATA . '/weblist.php';
    if (!empty($weblist)) {
        $url = $_SERVER['HTTP_HOST'];
        //当前域名
        $uarr = explode('.', $url);
        $prefix = $uarr[0];
        //域名前辍
        if (!array_key_exists($prefix, $weblist) && $prefix != $sys_webprefix) {
            if (!isset($GLOBALS['is404'])) {
                head404();
                //如果域名不匹配,则跳转到404页面.
                exit;
            }
        } else {