redirecting a page request to a secure page

Posted on 2007-07-31
Last Modified: 2013-12-12
I have a dynamic page thing setup. How can I automate it so that when the access:

They instead get:
(notice the 's' is added)

I'm using PHP. I'm not sure how to do it.
Question by:Frylock
    LVL 6

    Accepted Solution

    you can place on that page

    header ("Location: $URL");
    LVL 6

    Expert Comment

    on the first url that is
    LVL 2

    Expert Comment

    You could write a script at the top of the page to check $_SERVER["HTTPS"] and see if it is on or off. If its off, redirect to https://.

    if ($_SERVER["HTTPS"] =="off"){
    LVL 2

    Expert Comment

    sorry, replace the url i had with your url.....of course...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
    The viewer will learn how to dynamically set the form action using jQuery.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now