How to remove index.php from codeigniter in Fast-cgi
add the code in .htaccess
RewriteEngine onRewriteCond $1 !^(index\.php|resources|robots\.txt)RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php/$1 [L,QSA]
and config.php file change
$config['index_page'] = 'index.php';
to
$config['index_page'] = '';
Add this code in .htaccess file
RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php/$1 [L]//find the below code $config['index_page'] = "index.php"//replace with the below code$config['index_page'] = ""
Add this code in .htaccess file, notice the question mark behind index.php, that's the trick.
RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php?/$1 [L]
find the below code in config.php
$config['index_page'] = "index.php"
replace with the below code
$config['index_page'] = ""