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

    Join Date
    Mar 2005
    Posts
    355
    Rep Power
    11

    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.

    e.g.
    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 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,932
    Rep Power
    4033
    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:

    Code:
    $url = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    header('Location: '.$url);
    Recycle your old CD's, don't just trash them



    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