tstout2 Posted January 20, 2010 Share Posted January 20, 2010 Hey all! I currently use ASP for most of my pages, but I am working with an application that is in PHP. I need some help protecting my index.php as i have been doing with my ASP files, so can someone help me translate the following ASP code in the PHP equivalent? Thanks so much for any help! Current ASP code: <%@LANGUAGE="VBSCRIPT"%> <% Option Explicit %> <% 'This page will not be cache by the browser (security reason)! Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache" Response.Expires = -1 'This will make sure no user can access this page without login into the system first, 'If the user type this page address directly into the browser, they will be redirected into the login page! If Session("name") = "" Then Response.Redirect("index.asp") End If %> Quote Link to comment https://forums.phpfreaks.com/topic/189177-disabling-browser-cache-and-redirecting/ 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.