I have a web page, which can open a Target PHP URL in same domain in an IFRAME lightbox when user clicks a link. Inside the target URL, If “user logged in check” fails, how can I stop opening the IFRAME and redirect the parent window to login page?
or rather, open the Iframe only if user has logged in. Else, redirect the parent window to login page.
Appreciate any help.
If it is all the same domain and you’re not concerned about a JS solution you could deliver a page like this in the iframe if the user fails the login check.
Swap out REDIRECT_LOCATION for the location you want the parent window to redirect to.