[Tutorial][.htaccess] Forcing HTTPS on Your Page

reloadmydeagle Feb 13, 2015

  1. reloadmydeagle

    reloadmydeagle I LoVe GoldZ Lifetime Gold XPG Retired Staff
    205/282

    Joined:
    Oct 30, 2013
    Messages:
    1,608
    Likes Received:
    656
    Trophy Points:
    135
    Gender:
    Male
    Location:
    Texas
    Console:
    Xbox One
    Have a webpage with the https:// addon but it's not automatically redirecting to it or doesn't make users use it? Here's how to force everybody to use the https prefix when browsing your site!

    Code (add to your .htaccess file on server root):

    RewriteEngine on
    RewriteCond %{HTTPS} !on
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

    Enjoy! ;)
     
  2. ToxicGas

    ToxicGas Certified Developer Lifetime Gold XPG Retired Staff
    460/564

    Joined:
    Jan 23, 2015
    Messages:
    1,779
    Likes Received:
    1,307
    Trophy Points:
    460
    Gender:
    Male
    Console:
    Computer
    Great share thanks rifter.
     
  3. Xatoku

    Xatoku Good News Everyone! Lifetime Gold
    0/47

    Joined:
    Mar 15, 2012
    Messages:
    1,282
    Likes Received:
    299
    Trophy Points:
    0
    Gender:
    Male
    Location:
    Planet Express HQ
    Console:
    Xbox
    Whats the difference between HTTP and HTTPS?
     
  4. Yumiyashi

    Yumiyashi © Grey Horse Pr0n Lifetime Gold XPG Retired Staff
    55/94

    Joined:
    May 26, 2013
    Messages:
    321
    Likes Received:
    56
    Trophy Points:
    55
    Console:
    Xbox
    HTTPS is used to secure everything going between the client and the server. Its usually used on sites that require authentication. Example is a https:// bank site so you can have more security when you enter your bank numbers and stuff.

    http://en.wikipedia.org/wiki/HTTP_Secure

    (Good share Rifter. :3)
     
  5. reloadmydeagle

    reloadmydeagle I LoVe GoldZ Lifetime Gold XPG Retired Staff
    135/188

    Joined:
    Oct 30, 2013
    Messages:
    1,608
    Likes Received:
    656
    Trophy Points:
    135
    Gender:
    Male
    Location:
    Texas
    Console:
    Xbox One
    HTTPS carries data more securely and is less vulnerable to hackers. It also has other benefits, refer here: http://mashable.com/2011/05/31/https-web-security/ ;)
     
  6. Yumiyashi

    Yumiyashi © Grey Horse Pr0n Lifetime Gold XPG Retired Staff
    55/94

    Joined:
    May 26, 2013
    Messages:
    321
    Likes Received:
    56
    Trophy Points:
    55
    Console:
    Xbox
    Though people like the CIA or other such security branches have an easy time getting through HTTPS. :|
     
  7. reloadmydeagle

    reloadmydeagle I LoVe GoldZ Lifetime Gold XPG Retired Staff
    135/188

    Joined:
    Oct 30, 2013
    Messages:
    1,608
    Likes Received:
    656
    Trophy Points:
    135
    Gender:
    Male
    Location:
    Texas
    Console:
    Xbox One
    Yes, they have an easy time getting through anything with their resources :LOL:
    Not much you can do to keep government out.
     
  8. Iamcoolz

    Iamcoolz Forum Administrator Staff Member XPG Administrator
    205/282

    Joined:
    Mar 30, 2012
    Messages:
    1,227
    Likes Received:
    507
    Trophy Points:
    205
    Gender:
    Male
    Location:
    XPG
    Console:
    Xbox One
    It really just sends an encrypted connection, I use encrypted loosely because like said above federal government and agencies can decrypt it using an extremely powerful machine and algorithm used to decrypt it. They did this, to allow them to view users websites and login details in case they need it for a court case such as user logins for a BAN-ME-PLEASE site or, anything along those lines.
     

Share This Page

Close