Hello Friends,
When we are working on Codelgniter the URL in the browser appear with index.php generally, the URL appear like ::
"http://localhost/codelgniter/index.php/app/setuser"
and we would like to see this as
"http://localhost/codelgniter/app/setuser" to make this change we need to please review the below changes.
1) First we need to create a .htaccess file on the root of your folder and the code of this file as given below:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
2) After saving .htaccess file we need to open "codelgniter/application/config/config.php" and make the changes as below
$config['index_page'] = 'index.php';
// Should be replace with
$config['index_page'] = '';
Now you can run URL like http://localhost/codelgniter/app/setuser
0 Comment(s)