언어&플랫폼/Codeigniter 2015. 4. 7. 15:32

환경 : Ubuntu 14.04.1 LTS \n \l

WAS : apach2


moe_rewrite module 활성화?

$ sudo a2enmod rewrite

$ sudo service apache2 restart



{CI 폴더}/application/config/config.php 수정

$config['index_page'] = '';



{document root}/.htaccess 수정/생성

<IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

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


    <Files "index.php">

    AcceptPathInfo On

    </Files>

</IfModule>             



/etc/apach2/site-available/000-default.conf 수정

<Directory "/var/www/html"> AllowOverride All </Directory>


$ sudo service apache2 restart









참고


http://stackoverflow.com/questions/1445385/how-to-remove-index-php-in-codeigniters-path


http://www.dev-metal.com/enable-mod_rewrite-ubuntu-14-04-lts/

'언어&플랫폼 > Codeigniter' 카테고리의 다른 글

[codeigniter] mongodb 연동  (0) 2015.04.01
posted by cozyboy
: