Welcome Guest, Not a member yet? Register   Sign In
Before filters with main page redirect when I call a controller with ajax
#6

(This post was last modified: 11-24-2022, 11:39 AM by ozornick.)

Do you want an unauthorized user to be redirected to the main page when requesting Ajax?
then you need to determine that the request is from XHR and return some status or link. In JS function check "url = redirect or html = paste on page" condition
https://codeigniter.com/user_guide/general/ajax.html
Reply


Messages In This Thread
RE: Before filters with main page redirect when I call a controller with ajax - by ozornick - 11-24-2022, 11:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB