How to configure http Redirection to https with a .htaccess file

How to configure http Redirection to https with a .htaccess file


How to configure http Redirection to https with a .htaccess file

09/11/2019 |
BOC Orenzi

If SSL is installed, you haven't done so set http redirection to https, then visitors by default will still be redirected to the site with one start http which means the same as before, as if you were not installing an SSL certificate.

Redirect http to https

Installation by method redirection use htaccess if your site uses an Apache or Litespeed-type web server.

Note:

Make sure you have access to your site after you install SSL. So first check if the site can be accessed via https. To do this, type https: // then your domain name. For example https://websitesaya.com in a web browser. If it works, follow the instructions below. If it fails, this means there is a problem with the SSL installation. Please try to check again if it is suitable or not. Well the following transfer the http stage to https:

1. Log in to your Cpanel account (yourdomainname.com/cpanel), enter your username and password

Cpanel connection for http redirection to https

2. Select the File Manager menu, and then click the public_html folder

Manage files to redirect http to https

3. Once in public_html, the .htaccess file was not found, then find and click on the following settings icon:

Settings for http redirection to https

4. Then a pop up will appear as below, "Show Hidden Files" checklist and then Save

Popup for redirecting http to https

5. Right-click the .htaccess file, and then select edit, then a popup will appear as follows, and then select edit.

Edit to redirect http to https

6. Then copy the following script and paste it into your site's .htaccess file

RewriteCond% {HTTPS} disabled
RewriteRule (. *) Http: //% {HTTP_HOST}% {REQUEST_URI} (R = 301, L)

See the picture below

Show .htaccess file

Https redirection settings the use of .htaccess is complete. Refresh your site.

If you are still having problems, please contact us via live chat online https://boc.co.id or can send email to Technical assistance.