mendirect http ke https

Discussion in 'Desain Web dan Programming' started by b7oe, 22 Sep 2008.

Thread Status:
Not open for further replies.
  1. b7oe

    b7oe New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    bagaimana mendirect http ke https?
     
  2. ruangweb

    ruangweb (Ret) Community Leader

    Messages:
    688
    Likes Received:
    6
    Trophy Points:
    18
    quick n dirty kalo pake php kira2 gini
    PHP:
    if ($_SERVER['HTTPS'] != "on") { 
        
    header('Location:https://$hostname');
     }
     
  3. bizmedia

    bizmedia Beginner 1.0

    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    Ini menurut pengalaman saya harus dicek dulu apakah tempat hostingan anda menyediakan fitur ssl untuk dapat anda gunakan kemudian anda setting ssl anda ke halaman domain yang akan anda buat secure (https). Untuk mendirect coba gunakan .htaccess. Mungkin ada solusi lain.
     
  4. vishualhost

    vishualhost Expert 2.0

    Messages:
    813
    Likes Received:
    81
    Trophy Points:
    28
    kalo menurut saya semua server pasti support ssl kok, biasanya yg dipake shared ssl dan bukan private, cuma ya resikonya gt , kalo sharednya sudah disetting oleh yg punya server maka https entry point nya akan bersertificate server , dan jika belum diset otomatis maka seluruh user di server itu kalo write hhtps di web mereka akan ke redirect ke web user yg dah set ssl di web nya.
     
  5. bedebah

    bedebah Apprentice 2.0

    Messages:
    582
    Likes Received:
    4
    Trophy Points:
    18
    langsung aja:
    <?php
    header("location:https://secure.server.tld");
    ?>
     
  6. susan

    susan Apprentice 1.0

    Messages:
    288
    Likes Received:
    37
    Trophy Points:
    28
    coba pakai mod_rewrite, pasang di .htaccess atau httpd.conf

    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    susan,
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...