Hi, I don't know if this is the correct title, please accept my apology. I have an index.php (main page) and content.php (my content) page. If visitor visiting my website, when they return they simply click on the url bar and go to the content.php bypassing index.php My question is how to block user from directly viewing my content at content.php and redirect them to index.php. Only after they click a link on index.php they will be redirect to content.php. eg: at index.php: click here to view content and they will be redirect to content.php So I try with sessions: Index.php (at the top) session_start(); $_SESSION["first_time"] = 1; PHP: Content.php (at the top, before all code) if($_SESSION["first_time"] != 1){ header("Location: index.php");} PHP: The problem is even after my first_time = 1 my content.php keep redirecting me to index.php Why is that? Any idea ?? Thanks for any help
Though that SOUNDS like a splash page - if your index doesn't actually have the content people actually want to get to, why the devil have it as a separate file?