CI프로젝트 실행시 index.php 이름을 없애기

Posted by Albert 4420Day 21Hour 41Min 49Sec ago [2013-03-15]

우선 www 루트 폴더 위치에 .htaccess 파일을 생성한다.

해당파일에 아래와 같은 코드를 넣는다.

==========================================================

RewriteEngine on   

RewriteCond $1 !^(index\.php|images|robots\.txt)   

RewriteRule ^(.*)$ /codeg/index.php/$1 [L]


주의점은 오렌지 색으로 칠해놓은 부분인데 호스팅을 사용시에는 위의 항목을 없앤다.

나같은경우는 http://localhost:85/codeg/news  와 같은 경로를 사용하기때문에

/codeg를 넣은것이니 참고하길 바란다.




LIST

Copyright © 2014 visionboy.me All Right Reserved.