okok Posted May 14, 2004 Posted May 14, 2004 Hello According to your explanations, the contents of a website can be accessed both via normal http and using https. But suppose I want to prevent some pages/scripts from being accessed using a non-secure connection. What would be the right way to do this? The only way I could think of is to add a PHP script that verifies that the URL is indeed "https://...". Thanks Quote
TCH-Don Posted May 15, 2004 Posted May 15, 2004 I did find one idea that can be inserted into the pages, Code: >if($HTTP_SERVER_VARS["HTTPS"] != "on") { $newurl = "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; header("location: $newurl"); } from burnwave Quote
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.