0

Remove index.php in Codeigniter

Posted by Joey Villas on Feb 23, 2009 in CodeIgniter

How to remove index.php in the url of codeigniter. here is a simple step to do it.
You can remove it using .htaccess

1
2
3
4
5
6
7
RewriteEngine on
 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
 
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]

Write this code then save the file into .htaccess, then put the .htaccess file same directory in you index.php or the CI system folder etc.
Go to system > application > config, open config.php and set index_page into nothing.

1
$config[index_page]="";

Before: http://ww.yourdomain.com/index.php/example

After: http://ww.yourdomain.com/example

Share/Save

Tags:

 
1

Error 500 in codeigniter using xampp

Posted by Joey Villas on Jan 12, 2009 in CodeIgniter

The cause of that error 500 mostly its because your using .htaccess in codeigniter, to solve that problem go to the directory of your xampp for example c:\xampp\apache\conf\ and open the file named “httpd.conf” and go to line 118 and remove the comment which is the number sign (#) or search the “mod_rewrite” then remove the comment.

Share/Save

Tags: ,

Copyright © 2010 Joey Villas All rights reserved.