Too Many Redirect error if the redirect call is on the same controller - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: Too Many Redirect error if the redirect call is on the same controller (/showthread.php?tid=90483) |
Too Many Redirect error if the redirect call is on the same controller - elimariaaaa - 03-25-2024 I just noticed that when I call a redirect where the function is inside the same controller, it causes ERR_TOO_MANY_REDIRECTS error. However, when I call a redirect from another controller, it's working as expected. Code: public function _remap($method) RE: Too Many Redirect error if the redirect call is on the same controller - kenjis - 03-25-2024 Yes, if you redirect to the same URL, you will go into infinite loop. RE: Too Many Redirect error if the redirect call is on the same controller - elimariaaaa - 03-26-2024 So what should I do to stop the loop? Code: admin/users Code: public function usersView(){ I'm just expecting it to go to URL: admin/users and then show the view. RE: Too Many Redirect error if the redirect call is on the same controller - kenjis - 03-26-2024 Sorry, I don't understand why do you need infinite loop redirects. |