CodeIgniter removing index.php from url
Asked 07 September, 2021
Viewed 1.2K times
  • 67
Votes

My current urls look like this [mysite]index.php/[rest of the slug].
I want to strip index.php from these urls.

mod_rewrite is enabled on my apache2 server. In config, $config['index_page'] = '';

My codeignitor root .htaccess file contains,

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

But still it is not working. Where am I going wrong?

30 Answer