0

I have a problem with removing the "index.php" from my URL in CodeIgniter.

I tried as to change my .htaccess file to :

RewriteEngine On
RewriteCond $1 !^(index\.php|(.*)\.swf|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

I also tried to change $config['index_page'] to '' and to change $config['uri_protocol'] to 'REQUEST_URI' but it won't work.

I've also added these lines to etc/apache2/apache2.conf :

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

bu it didn't worked either.

Croviajo
  • 253
  • 1
  • 8
  • 17

1 Answers1

1

Try this one:

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

You'll find other solutions here: How to remove "index.php" in codeigniter's path

Community
  • 1
  • 1
Antoine
  • 2,785
  • 1
  • 16
  • 23