We can use the redirect() function to redirect on any page.

Example

                                        

$this->load->helper('url');       // Firstly you have to load url helper.
if (condition != TRUE) {
    redirect('login_page');
}

Suggest An Answer

Our Particitants

Here , login_page is another controller name. When condition satisfy it redirects to the the controller.