discuz如何实现pc端访问域名:www.baidu.com手机端访问域名为m.baidu.com,使用手机访问自动跳转 首先要确保在discuz 后台已经设置了手机域名 discuz如何设置手机域名Discuz如何给设置二级域名 使用FTP打开source/class/discuz/discuz_application.php文件 搜索代码:if($nomobile 大约在775行左右,将下面代码添加到该if判断上面 if($_SERVER['HTTP_HOST'] == $this->var['setting']['domain']['app']['default'] && !$nomobile) { dheader("Location:https://".$this->var['setting']['domain']['app']['mobile'].$_SERVER['REQUEST_URI']); return false; } 最后,用手机端访问任何一个页面都会跳转到移动端上! |