Codeigniter URL Redirect WITHOUT adding index.php
You can use redirect
. It only adds index.php
if it is configured as your index page.
So, check your index_page
configuration. It should be an empty string:
$config['index_page'] = '';
File: app/config/config.php
More info: http://www.codeigniter.com/user_guide/general/urls.html?highlight=mod_rewrite [Updated Version]
you needs to add another .htaccess to root folder of your codeignitor based project and write there some redirect rules as below example :
RewriteEngine OnRewriteBase /codeignitortest/RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule (.*) index.php?$1 [QSA,L]
or can make below in application/config/config.php
$config['index_page'] = 'index.php'; to $config['index_page'] = '';