Welcome Guest, Not a member yet? Register   Sign In
Redirect Not Working CI4
#11

(This post was last modified: 04-23-2020, 02:55 AM by Leo.)

err, if anyone needs a quick fix for a redirect I just use this:

header('Location: /login');
exit();

it works everywhere so far, I actually have a check login function in my base controller where this is working from.

Beware though, it seems an exit() will prevent any of your "after stuff happens" events or filters from working.
Update: also a check login in base controller doesn't seem like a good idea anymore, so I made it as a public static function in a library
You can see things I made with codeigniter here: itart.pro its not overly impressive as I have very little time to learn.
Reply


Messages In This Thread
Redirect Not Working CI4 - by Programaciones Web - 11-07-2019, 07:57 AM
RE: Redirect Not Working CI4 - by adelbak - 11-07-2019, 11:52 AM
RE: Redirect Not Working CI4 - by dave friend - 11-08-2019, 06:22 AM
RE: Redirect Not Working CI4 - by Chivinsdev - 11-11-2019, 09:21 AM
RE: Redirect Not Working CI4 - by Juan Fajardo - 06-02-2020, 10:49 AM
RE: Redirect Not Working CI4 - by kilishan - 11-11-2019, 09:58 AM
RE: Redirect Not Working CI4 - by InsiteFX - 11-12-2019, 04:07 AM
RE: Redirect Not Working CI4 - by Gary - 04-18-2020, 03:22 PM
RE: Redirect Not Working CI4 - by Gary - 04-18-2020, 07:16 PM
RE: Redirect Not Working CI4 - by Leo - 04-20-2020, 02:42 AM
RE: Redirect Not Working CI4 - by jim1001 - 05-21-2020, 04:26 AM
RE: Redirect Not Working CI4 - by dave friend - 05-21-2020, 01:02 PM
RE: Redirect Not Working CI4 - by Leo - 05-22-2020, 09:46 AM
RE: Redirect Not Working CI4 - by ivanfdr - 04-22-2020, 09:16 PM
RE: Redirect Not Working CI4 - by abeni_ab - 07-22-2020, 09:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB