Posted On: Feb 22, 2018
In CodeIgniter by default, the index.php file will be included with the URLs. But you can easily remove the index.php from the URL doing follwing changes
#1 Change the $config['index_page'] = "index.php" to $config['index_page'] = "" from config.php file.
#2 Create .htaccess file and add the following code
RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA]
That's It you have done
Never Miss an Articles from us.
What is the current version of Codeigniter?..
How to check the version of CodeIgniter framework?..