Preventing the redirect URL from showing in address bar (login script)

I have a login script that enables only people with the passcode to view certain pages, (only a previous server) after successful login the URL address bar would always have just the link to the login.php file only, not the destination URL.

eg. should only be shown and not show the actual address of the page it linked to, (if the page was refreshed it would bring up the login page again.

This was a very useful feature but it’s now not working. The working script is at

the php script is below, when logged in you’ll be able to see that the destination address of the page is visible. Is there any way to retain just the login.php address in the browser bar?


<?php error_reporting(-1); ini_set('display_errors', '1'); $product= "The Reality Creations"; // products name that appears in login page $passcode[0] = "516204"; // passcode restrcited to max length 12 charactors $redirect_page[0] = ""; // redirect url on successful login $passcode[1] = "924537"; $redirect_page[1] = ""; //description //Add as many passcodes and redirect links using above format //***************************************************************************************** // DO NOT MAKE CHANGE BELOW THIS LINE //***************************************************************************************** $i = 0; foreach ($passcode as $v) { if ( !strcmp($_POST['pass'] , $v) ) { include($redirect_page[$i]); header("Location: ".$redirect_page[$i]); exit; } $i++; } ?> Restricted Login Access-

Welcome to <?php print $product; ?> Private Access Area

Please enter your passcode and click the login button


Enter passcode:

         if (isset($_POST[pass]) ) { print "<div align=\"center\" class=\"err\">The passcode that you entered has either expired, or is incorrect, <br> please check and try again</div>"; };

Please note, this is a restricted area for existing customers only
If you experience any difficulty you can email us for
assistance at [email protected]

thanks but the issue is not to make the URL shorter but to hide the URL of the private landing page and only display the login.php address (not the final destination page after login). Is it possible to do this?

Sponsor our Newsletter | Privacy Policy | Terms of Service