redirect to different controller not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: redirect to different controller not working (/showthread.php?tid=41386) |
redirect to different controller not working - El Forum - 05-06-2011 [eluser]Gukkie[/eluser] Hi, i have a problem when i use the redirect() to redirect to another controller. From login Controller: redirect('site/user'); This does not work unless i add a base_url, redirect(base_url().'site/user');. Why is this so? redirect to different controller not working - El Forum - 05-06-2011 [eluser]pickupman[/eluser] Depending on what you have set for base_url in your config, I assume its set at /. You could try: Code: redirect('/site/user'); redirect to different controller not working - El Forum - 05-06-2011 [eluser]Gukkie[/eluser] Hi, i fixed it, the problem was because i set $config['enable_query_strings'] = TRUE;, i've changed it back to FALSE and it works redirect to different controller not working - El Forum - 05-06-2011 [eluser]pickupman[/eluser] Well done |