Jump to content

Recommended Posts

Posted

Hi, there! Howdy, all? This time, my question is related to how I can force https only throughout my website. Well, I've installed my certificates via ZeroSSL, just by following the instructions given by you at: https://wiki.helionet.org/Installing_a_Let%27s_Encrypt_SSL_Certificate

Ok, excellent! It's all working. But even so, I notice that if I type http it still there. What I want is that when a user types http as if it were the default protocol and then presses "enter", he/she is automatically redirected to the https version. That's all, guys. So... How do I do this? Thank you!

 

Posted

Add the following code to your .htaccess file (create new if u don't have one) :

 

RewriteEngine On

RewriteCond %{HTTPS} !=on

RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Alright, but... I believe that I don't have one. How do I create it? Do I just click on create new file and name it .htaccess and then add the code above given by you? Could you give me an example?

Posted

Go to the settings in the upper right of cPanel File Manager and enable the "show hidden files (dot files)" option. If you still don't see it, you can just create a new one.

Posted

Alright, but... I believe that I don't have one. How do I create it? Do I just click on create new file and name it .htaccess and then add the code above given by you? Could you give me an example?

Do as flazepe directed first. However if u still don't find that file then your method is correct.

Posted (edited)

 

Alright, but... I believe that I don't have one. How do I create it? Do I just click on create new file and name it .htaccess and then add the code above given by you? Could you give me an example?

Do as flazepe directed first. However if u still don't find that file then your method is correct.

 

Oh, now I understood. I'll try here, then I'll let you know, guys! ;)

Edited by roguitar
Posted

Go to the settings in the upper right of cPanel File Manager and enable the "show hidden files (dot files)" option. If you still don't see it, you can just create a new one.

Where do I create the file? In what folder?

Posted (edited)

Go to the settings in the upper right of cPanel File Manager and enable the "show hidden files (dot files)" option. If you still don't see it, you can just create a new one.

Where do I create the file? In what folder?

Guys, I got it!  :)  <_<  :D  :D  :D  :D  :D  :lol:  You're awesome! Thank you!! I just created the .htaccess file copied and pasted the proposed code into it and in the root directory and bingo!

Edited by Krydos
fixed quotes

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...