Redirect all request to https://www.

Discussion in 'Masalah Teknik dan Keamanan' started by bukithosting, 17 May 2015.

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

    bukithosting Poster 2.0

    Messages:
    120
    Likes Received:
    18
    Trophy Points:
    18
    Mohon bantuan tuan2 master DWH

    .htaccess yg saya gunakan =

    Code:
    RewriteEngine on
    
        RewriteCond %{HTTPS} !^on$
        RewriteRule (.*) https://www.example.com/$1 [R,L]
    
        RewriteCond %{HTTP_HOST} !^www\.
        RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    
        RewriteBase /
    
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule /?([A-Za-z0-9_-]+).html$ index.php?id=$1 [QSA,L]
    
    masalah terjadi ketika request masuk dengan = https://domain.com >>> https://www./

    Mohon di jelaskan agar all request yang masuk redirect to https://www.domain.com
    untuk mengganti kekurangan code diatas... terima kasih

     
    SulisSoft likes this.
  2. Best Answer:
    Post #5 by SulisSoft, 17 May 2015 (3 points)
  3. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
    Masalah ada di %{HTTP_HOST}
     
  4. bukithosting

    bukithosting Poster 2.0

    Messages:
    120
    Likes Received:
    18
    Trophy Points:
    18
    boleh koreksinya tuan yg benar seperti apa:63:
     
  5. srtider

    srtider Poster 1.0

    Messages:
    83
    Likes Received:
    7
    Trophy Points:
    8
    Last edited: 17 May 2015
  6. SulisSoft

    SulisSoft Hosting Guru Web Hosting

    Messages:
    1,265
    Likes Received:
    361
    Trophy Points:
    83
    Best Answer
    Aulianza and bukithosting like this.
  7. bukithosting

    bukithosting Poster 2.0

    Messages:
    120
    Likes Received:
    18
    Trophy Points:
    18
    sudah solved mas, terima kasih sdh membantu:113:
     
    SulisSoft likes this.
  8. SulisSoft

    SulisSoft Hosting Guru Web Hosting

    Messages:
    1,265
    Likes Received:
    361
    Trophy Points:
    83
    sama2 Mas... :D
     
  9. palingwaras

    palingwaras Beginner 2.0

    Messages:
    44
    Likes Received:
    6
    Trophy Points:
    8
    browsernya nggak ngirimkan Header Host kah sehingga HTTP_HOST nggak ada nilainya?
     
  10. join8x

    join8x Beginner 1.0

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Thank you all
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...