codeigniter index.php 제거하기

Apache 설정


	sudo vi /etc/apache2/sites-available/000-default.conf

	AllowOverride None -> AllowOverride All

	sudo service apache2 restart


ci config.php 설정


	$config['index_page'] = '';


.htaccess 수정



  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]


댓글(0)