$_SERVER['HTTPS'] to check page secure status
Redirecting based on output ( Read more on header redirect )
We are using header redirection here so above code is to be kept at top of the page and should execute before sending any output to browser.
Redirecting after some time lapse.
.htaccess fileTo redirect all requests from http to https
You need to add one more line at the top of this code if it is not done before inside you file.
Don't forget to update / replace plus2net.com with yourdomain.com
Making your pages secureAfter installing the certificates, it is time to check your pages.
You might have some internal paths pointing to unsecured pages like
Or some old external URL like
In the presence of such urls you will get in your address bar like this.
You need to change these URLs in your pages like this. ( https: to https: )
After changing all urls to https: then your page address bar will look like this ( green https: with lock symbol saying that the data transmission to your browser is encrypted and secure )
Search and replace http: to https:If your site stores URL in database tables , then you can use SQL Replace query to update all your http: to https: present in Links. Here is the query you can use.
Some useful links regarding migration to httpsSecure your site with HTTPS
Overview: Site moves with URL changes
Add a website property
Subscribe to our YouTube Channel here
This article is written by plus2net.com team. https://www.plus2net.com