For doing this there is one good plugin called “Mobile Detect”. Just download library from https://github.com/serbanghita/Mobile-Detect Put Mobile_Detect.php inside libraries folder of ci application. Whenever you need to detect the OS or any other parameter, use following code: public function index() { $this -> load -> library('Mobile_Detect'); $detect = new Mobile_Detect(); if ($detect->isMobile() || $detect->isTablet() || $detect->isAndroidOS()) { header("Location: ".$this->config->item('base_url')."/mobile"); exit; } } You can find variety of functions like this in here:...
Mobile-Detect
