index.php 죽이기를 했는데 코드이그나이터가 다른 하위 폴더에 있을 경우가 있다,
그럴 경우 엄청 난감한다.

index.php를 죽일때 폴더 위치까지 같이 설정해주면 된다.

index.php 죽이기를 할 때 설정한 .htaccess 파일이 있을 것이다.

그 파일을 열어준 다음
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index\.php|images|captcha|data|include|uploads|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ 경로/index.php/$1 [L]
</IfModule>

경로라고 적혀있는 부분에 하위 폴더의 이름을 적어주면 된다.

만약 폴더 경로가
naver.com/test1/test2/test3 안에 ci가 깔려있다고 가정하면


<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase / 
RewriteCond $1 !^(index\.php|images|captcha|data|include|uploads|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ test1/test2/test3/index.php/$1 [L] 
</IfModule>


이렇게 설정해주면 된다.

+ Recent posts