C: / xampp / apache / conf / extra / httpd-vhosts.conf
파일을 열어서 다음과 같이 추가한다.
<VirtualHost *:80> # 포트 번호
ServerAdmin webmaster@test.ci.com
DocumentRoot "C:/xampp/htdocs/ci_0323" # 경로의 폴더가 실행된다.
ServerName test.ci.com # 입력하면
ErrorLog "logs/test.ci.com-error.log"
CustomLog "logs/test.ci.com-access.log" common
</VirtualHost>
# app/config/routes.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$route['default_controller'] = 'welcome'; // 가 기본 컨트롤러로 설정돼 있다.
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
# controllers/welcome_message.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index()
{
$this->load->view('welcome_message');
}
}