Over redirect in Codeigniter

Asked

Viewed 357 times

1

When I try to run my application in codeigniter the page to load and an error message is displayed that there is an excess redirect. In the application, I need to be redirecting the user whenever there is no particular session, and for that I am using the redirect function()

Any help is welcome, I thank you in advance

Error prints and part of redirect code: https://imgur.com/a/vbEGv

  • Put the code. Image can not copy and play. It facilitates the life of those who will try to solve your problem.

  • Gave Loop in Views

1 answer

2

Your check is done on your /?

If yes you are entering a loop infinite when redirecting back to / if the user is not logged in.

Instead of redirecting to /, send to the page of /login instead and ensure that this page is not checked and redirected if the user is not logged in.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.