Search code examples
codeigniter-urlcodeigniter-routing

A mistake in Codeigniter URL when post a form


I am a beginner in codeigniter framework. In codeigniter v.3 I create a form <?php echo form_open("login/registration"); ?> Current URL is "http://padpors/login"; but when I submit form, form has posted to "http://padpors/padpors/index.php/login/registration"


Solution

  • go to application/config/config.php

    here you will find $config['base_url'];

    edit the line to:

    $config['base_url'] = 'http://padpors/';