Reputation: 407
In Codeigniter when I use form_open()
function it adds index.php
to url.
How can remove it ?
Note : I removed index.php from url with htaccess.
Upvotes: 3
Views: 4182
Reputation: 265
You not removed the index.php from $config['index_page'] = "index.php";
/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
//$config['index_page'] = 'index.php';
$config['index_page'] = '';
Upvotes: 4
Reputation: 2452
You can give action to the form_open(),something like this
form_open(base_url().'your_controller_name/function_name');
Upvotes: 15