diff --git a/system/core/Controller.php b/system/core/Controller.php index e7aee0d79002273965d6d6422eb7c397a6c88e12..037ff70ead8026cb83d3ce57f4285dfd55bcf605 100644 --- a/system/core/Controller.php +++ b/system/core/Controller.php @@ -88,7 +88,7 @@ class CI_Controller { $this->load->library ( 'encrypt' ); } - if (strstr ( trim ( config_item ( 'mobile_domain' ) ), $_SERVER ['SERVER_NAME'] )) { + if (strstr ( trim ( config_item ( 'mobile_domain' ) ), $_SERVER ['HTTP_HOST'] )) { defined ( 'SITE_URL' ) or define ( 'SITE_URL', config_item ( 'mobile_domain' ) ); } else { defined ( 'SITE_URL' ) or define ( 'SITE_URL', config_item ( 'base_url' ) );