1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Rep Power

    SSL enable, disable

    I have seen pages where SSL (green url) is only shown once the user enters a secure section of the website. Amzingly it's all the same domain.

    1st cklick: http://domain.com/welcome.php
    2ndcklick: https://domain.com/register.php
    3rd cklick: https://domain.com/welcome.php

    So if I browse first the welcome page SSL is off. Once I proceed tho the register.php it turns on, and if I then go back to welcome.php even without filling in any data it stays on.

    I thought SSL will apply for a Domain. So is there a way to turn SSL on and off (trough php?) on the same Domain it applies?
  2. #2
  3. Wiser? Not exactly.
    Devshed God 2nd Plane (6000 - 6499 posts)

    Join Date
    May 2001
    Bonita Springs, FL
    Rep Power
    Whether SSL is on or off just depends on if they are accessing the site via https:// or http://. To turn it on or off you just redirect them to the appropriate version. Eg:

    $url = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    header('Location: '.$url);
    Recycle your old CD's

    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud

IMN logo majestic logo threadwatch logo seochat tools logo