Caner Korkmaz
Caner Korkmaz

Reputation: 407

Codeigniter Form Open How To Remove index.php

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

Answers (3)

JWC May
JWC May

Reputation: 654

Open App.php

and find and change: public $indexPage = '';

Upvotes: 0

Gustavo Castro
Gustavo Castro

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

Udaya Sri
Udaya Sri

Reputation: 2452

You can give action to the form_open(),something like this

form_open(base_url().'your_controller_name/function_name');

Upvotes: 15

Related Questions