Remove index.php from URL in Codeigniter Remove index.php from URL in Codeigniter codeigniter codeigniter

Remove index.php from URL in Codeigniter


This is the simple way and it works fine for removing index.php from your url

RewriteEngine onRewriteCond $1 !^(index\.php|uploads|css|js|lib|img|bootstrap|robots\.txt)RewriteRule ^(.*)$ /manage/index.php/$1 [L]instead of manage put your own application folder name.


Use following htaccess code to remove index.php from your codeigniter url

RewriteEngine onRewriteCond $1 !^(index\.php|images|robots\.txt|css)RewriteRule ^(.*)$ ./index.php/$1 [L]


Though your client confirmed the rewrite module is working, what don't you confirm it yourself, make a php file on the root of the project with the code below and try to browse the file.

<?php if( !function_exists('apache_get_modules')){        echo 'Rewrite module not available'; }else{    if(in_array('mod_rewrite',apache_get_modules()))        echo 'Rewrite module enabled'; }