Welcome Guest, Not a member yet? Register   Sign In
Redirect
#1

[eluser]RogerM[/eluser]
I have a library and within its function it has a redirect method in it. Like so:

Code:
if($logged_out && $this->logged_in()){
            redirect('/admin');
        }
        
        if(! $logged_out && ! $this->logged_in()){
            $this->CI->session->set_userdata('redirected_from', $this->CI->uri->uri_string());
            redirect('admin/login');
        }

For some reason it is redirecting me to
http://localhost/index.php/admin/login instead of
http://localhost/SITENAME/index.php/admin/login

my config file base_url is http://localhost/iip/

Any thoughs
#2

[eluser]RogerM[/eluser]
Figured the problem out.

On my login form the form action was coming up incomplete. It didn't have the entire URL for my site and controller.

All works now!

Roger




Theme © iAndrew 2016 - Forum software by © MyBB