Almost everybody wants to remove the index.php from the URL.
The codeigniter documentation says that we have to add this code in the .htaccess file at the root of our project.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
BUT, some people has problems when they upload the project in a web server, while it works perfect in local.
The solution is very simple. add a
? after
index.php, and it will work!
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
?/$1 [L]
I hope it helps!
By the way, some servers need to add RewriteBase. In that case, add it just after RewriteEngine On