Cara Menghilangkan index.php Pada CodeIgniter dan 500 Internal Server Error


Buka httpd.conf di folder instalasi Apache, biasanya berada di:
/apache/conf/httpd.conf atau /etc/httpd/httpd.conf

Cari modul mod_rewrite.so atau (mod_rewrite.c pada beberapa kasus).

Lalu hilangkan tanda # Pada #LoadModule rewrite_module modules/mod_rewrite.*

Setelah itu Restart Server Apache.

Lalu buat file .htacces di folder instalasi CodeIgniter kamu dan copy/paste code di bawah ini.

# index file can be index.php, home.php, default.php etc.
DirectoryIndex index.php

# Rewrite engine
RewriteEngine On

# condition with escaping special chars
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

Lalu buka file configurasi CodeIgniter, yg biasanya terletak di ./application/config/config.php

Lalu ubah $config[‘index_page’] = ‘index.php’; menjadi $config[‘index_page’] = ”;

Sumber:

http://stackoverflow.com/questions/6674689/codeigniter-php-apache-500-internal-server-error

http://punynote.blogspot.com/2014/02/cara-menghilangkan-indexphp-pada.html