removing index.php in codeigniter
snippet in php

how to remove index.php in codeigniter

user2389

<?php 
#By default, the index.php file will be included in your URLs:
  
# Create a .htaccess file in your root folder and paste the below code 
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
?>

removing index.php in codeigniter

user8966

//find the below code   
$config['index_page'] = "index.php" 
//replace with the below code
$config['index_page'] = ""

remove index.php in codeigniter

user9718

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]