Introduction:
In today's article, I will guide you, How to forcefully
redirect your website into HTTPS. Basically, there are two methods to redirect
your website into HTTPS.
v First method:
· Login to your cPanel account and then find out the "Domains" section.
· After that, click on this Domain's option.
· On this page, Just enable this "Force HTTPS Redirect" option,
and then you can see the website is successfully redirected to HTTPS.
v Second method:
· Go to your "File Manager", and then go inside to the public_html.
· Now there is a Hidden file, named ".htaccess". So for seeing
it, click on "settings" option, and then select "Show Hidden
Files" option, and then click on "save" button.
· Now here you can see all hidden files will appear.
· Select ".htaccess" file and then right click on it.
· Here you can see the "Edit" option, So simply click on it,
and then popup box will appear.
· Again, click on "edit" button, and then you will be
redirected.
· So now enter the following code inside this file, and don't
forget to replace the domain.
RewriteEngine On
RewriteCond %{SERVER_PORT}
80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
· Once you're done, then click on "Save" Changes button.
· Now if you search your website, then it will directly redirect to HTTPS, and your website working flawlessly.
Search
Popular Posts
Completely remove Apache and its configuration files from an Ubuntu system
04/12/2023
How to Activate Microsoft Visual Studio (2017 to 2022)
23/12/2023
Installing MikroTik RouterOS on Ubuntu or any Linux distribute
12/01/2024
Microsoft Office Direct Download Links 2021, 2019, 2016, 2013, 2010
04/12/2023