SSL Redirect error

Discussion in 'Performance Tweaking' started by Ring, Mar 10, 2017.

Thread Status:
Not open for further replies.
  1. IMG_2551.PNG So my website currently uses SSL when you use https://, I want it so that if I put http://, it will redirect to https://

    Redirect:

    IMG_2551.PNG

    Website using http:// WITHOUT redirect:
    IMG_2552.PNG

    Website using https:// WITHOUT redirect:
    IMG_2553.PNG

    ~ Notice the lock..

    Website with BOTH http:// & https:// WITH redirect:
    IMG_2554.PNG

    Am I doing something wrong? Ask me if you need to see anything, link is up there if you want. PM me if you want it w/ redirect or w/o to see for yourself
     
  2. Keeping redirect off for now
     
  3. mathhulk

    mathhulk Retired Moderator
    Retired

    You can do this with an htaccess file.
    Code (Text):
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
     
  4. Solved, thanks! :)
     
Thread Status:
Not open for further replies.