우분투 코드이그나이터 index.php 사라지게 하기.
우분투 리눅스 코드이그나이터 index.php 죽이기
우분투에서 mod-rewrite 설치..
sudo a2enmod rewrite
sudo nano /etc/apache2/apache2.conf
<Directory 경로>
Options Indexes FollowSymLinks
AllowOverride All (None 되어있다면 All 변경)
Require all granted
</Directory>
맨 아래
#mod_rewrite
<IfModule mod_rewrite.c>
rewriteEngine On
</IfModule>적용..
혹시나 하는 맘에.
sudo nano /etc/apache2/sites-available/000-default.conf
<Directory 경로>
Options Indexes FollowSymLinks
AllowOverride All (None 되어있다면 All 변경)
Require all granted
</Directory>
코드이그나이터 설치된 폴더 최상위에 .htaccess 파일을 만들고 해당내용을 입력
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index\.php|images|captcha|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /todo/index.php/$1 [L]
</IfModule>