Redirect http to https

Discussion in 'General OpenLiteSpeed Discussion' started by getphuture, Feb 25, 2015.

  1. getphuture

    getphuture New Member

    Good day everyone,

    I'm looking for a way to redirect all my traffic from http to https.
    How do you do it please ? I'm stuck :confused:
     
  2. Tracy Perry

    Tracy Perry Active Member

    This works for me
    Code:
    RewriteCond %{HTTP_HOST} ^twowheeldemons.com$ [NC]
    RewriteRule ^(.*)$ https://twowheeldemon.com/$1 [R=301,L]
         
    RewriteCond %{HTTP_HOST} ^www.twowheeldemon.com$ [NC]
    RewriteRule ^(.*)$ https://twowheeldemon.com/$1 [R=301,L]
    RewriteCond %{HTTPS} !on
    RewriteRule ^(.*)$ https://twowheeldemon.com%{REQUEST_URI} [R,L]
     
    lsmichael and getphuture like this.
  3. getphuture

    getphuture New Member

Share This Page