How to remove "index.php" in codeigniter's path
To remove "index.php" from the URL in CodeIgniter, you can use the .htaccess file. Here's an example of how to do it:
Create a .htaccess file in the root of your CodeIgniter installation.
Add the following code to the .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
- Make sure that the mod_rewrite module is enabled on your server. If not, contact your hosting provider to enable it.
- Open the application/config/config.php file and set the $config['index_page'] variable to an empty string:
$config['index_page'] = '';
Now, the "index.php" should be removed from your URLs and your CodeIgniter application should work as expected.
Note: This process may vary depending on your hosting provider and server configuration.