CI支持多域名访问设置

config.php文件

$proto = "http" .((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "") . "://";

$server = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];

$server .= str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']);

$config['base_url'] = $proto . $server;

//$config['base_url'] = 'http://manyoula/';


你可能感兴趣的:(CI支持多域名访问设置)