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 Link to comment https://forums.phpfreaks.com/topic/157353-solved-need-help-please/ 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? Link to comment https://forums.phpfreaks.com/topic/157353-solved-need-help-please/#findComment-829386 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. Link to comment https://forums.phpfreaks.com/topic/157353-solved-need-help-please/#findComment-829392 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. Link to comment https://forums.phpfreaks.com/topic/157353-solved-need-help-please/#findComment-829393 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.