Step 1: Go to your project directory C:\xampp\htdocs\project_folder

Step 2: Create a .htacess file in root folder same as C:\xampp\htdocs\project_folder\.htaccess

Step 3: Insert rewrite code in .htacess and save.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Step 4: Re-Start the apache & MySQL service of Xampp

Step 5: Go to config.php of application directory of the project and open config.php

Step 6: Follow the path same as (C:\xampp\htdocs\project_folder\application\config\config.php

Step 7:  Find $config[‘index_page’] = “index.php”;  Replace with $config[‘index_page’] = “”;

Step 8: Save and exit again restart the apache and MySQL of Xampp server

Step 9: You are done, now you can access the URLs without index.php in Codeigniter.


Changed status to publish