는 더 controller/method/args
세그먼트가 기본 컨트롤러로 라우팅 주어지지하는 모든 요청 반면
http://your.domain/index.php/controller/method/arg1/../argn
입니다.
기본 컨트롤러는 application/config/routes.php
에 정의되어 있으며 다음과 같이 변경해야합니다 :
$route['default_controller'] = "my_default_controller";
곳 my_default_controller
분명히 사용자가 설정해야하는 컨트롤러이며, 거기에 당신은 설정 :
public function index()
{
$this->load->helper('url'); // might actually not be needed
redirect('cnst/#/mapboard');
}
다른 컨트롤러에도 기본 컨트롤러를 사용하는 경우 다음을 고려할 수 있습니다.
public function index()
{
if ($this->input->server('Request_uri') == '/' and $this->input->server('Http_host') == 'my-host')
{
$this->load->helper('url'); // might actually not be needed
redirect('cnst/#/mapboard');
}
// your other stuff
}
은 또는 당신은 실제로 routes.php
설정 파일에 다른 기본 컨트롤러를 설정할 수 있습니다 :
if ($_SERVER['REQUEST_URI']) == '/' and isset($_SERVER['HTTP_HOST']) and $_SERVER['HTTP_HOST'] == 'my-host')
{
$route['default_controller'] = 'my_special_controller';
}
else
{
$route['default_controller'] = 'my_normal_controller';
}
봐라.