terrellk Posted June 11, 2009 Share Posted June 11, 2009 I have a few sites setup in such a way that index.php?c=blah includes blah.php. However, I have a login screen open if you're not logged into the site. Now in order to bypass the login, you just have to go straight to blah.php and show the contents without authenticating the login. I need a work around so that if you try to go directly to blah.php it authenticates and forwards you back to index.php?c=blah. not sure the best way to go about this. Thanks Link to comment https://forums.phpfreaks.com/topic/161877-includes/ Share on other sites More sharing options...
jxrd Posted June 11, 2009 Share Posted June 11, 2009 You could validate $_SERVER['PHP_SELF'] to see what it is. If it's not index.php, do whatever and redirect. Link to comment https://forums.phpfreaks.com/topic/161877-includes/#findComment-854084 Share on other sites More sharing options...
haku Posted June 12, 2009 Share Posted June 12, 2009 When the person logs in, it should set a session variable for them showing that they are logged in. Check to see if this exists and is proper. If it isn't, redirect them to an error page. Link to comment https://forums.phpfreaks.com/topic/161877-includes/#findComment-854214 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.