• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why i can't redirect to my controller ?

#1
[eluser]Mario "St.Peter" Valentino[/eluser]
Hello guy i have a controller in this path
Code:
controllers
   - admin
        - shopping
            -category.php

why i can't redirect to this controller.

i wrote code like this

Code:
<?php
class Login extends CI_Controllers
{
    public function login_check($user,$password)
    {
         //code goes here .....
         //...........

         //then redirect to category controller
         redirect('admin/shopping/category');
    }
}
?>


Code above make me get an error message : The page you requested was not found.

can anyone help me why this happen ?




Thanks



Mario

#2
[eluser]jotorres1[/eluser]
Try using your base_url(), assuming you have it set, and you have loaded URL helper.

Code:
<?php

     $redirect = base_url().'admin/shopping/category';
     redirect($redirect);
?>


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.