I have a simple login page which works fine, now i need to somehow intercept all incoming requests to my PHP app so i can check if a user is logged or not and accordingly allow or deny access.
Currently, if someone knows the url of a given resource, let's say http:\www.mystuff.com\page.html, he or she can access it directly. What i want to achieve is to have said access attempt validated so if the person has not logged in, instead of seeing page.html he or she gets an "access denied" page.
how can that be done?