richarro1234 Posted May 8, 2009 Share Posted May 8, 2009 Hey, Im trying to make a page that can not be accessed directly. I.E. i need to block index.php but allow index.php?id=1. how do i go about doing this? Thanks Rich Quote Link to comment Share on other sites More sharing options...
Zhadus Posted May 8, 2009 Share Posted May 8, 2009 <?php if (isset($_GET['id'])) { // Show Page } else { // Don't Show Page or Redirect } ?> Like that? Quote Link to comment Share on other sites More sharing options...
w3evolutions Posted May 8, 2009 Share Posted May 8, 2009 You can also use Apache mod_re-write to accomplish this. Quote Link to comment Share on other sites More sharing options...
richarro1234 Posted May 8, 2009 Author Share Posted May 8, 2009 abit like that yea, basically theres 3 values at the end of the pagwe that need to be there before the page can be shown, but it also shows if there is nothing there, so at the moment index.php is shown but it needs to be index.php?userid=<id>&email=<email>&code=<code> so i need to check that all 3 are there before the page shows, but i was hoping to do it as described above. w3evolutions, im not that good at using mod_rewrite so have no idea how to do it that way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.