Codeigniter 3 Remove index.php Problems
I made this way:
Created the .htaccess in the root folder of the project with the content:
RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond $1 !^(index\.php|css|js|images|robots\.txt)RewriteRule ^(.*)$ index.php?$1 [L]
Then, in the config.php i modified this line.
From:
$config['url_suffix'] = 'index.php';
To:
$config['url_suffix'] = '';
Kindly add the below codes to .htaccess file and include it directly to your /codeigniter_project_folder/.htacess
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L]
If your Apache server has mod_rewrite enabled, you can easily remove this file by using a .htaccess file with some simple rules.
RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php/$1 [L]
Remove the ?
after index.php