How can I redirect http to https?

Create an .htaccess file with the following contents and upload it to your public_html directory.

   RewriteEngine On
   RewriteCond %{SERVER_PORT} !443
   RewriteRule (.*) https://www.yourdomain.com/ [R]

another method:

   RewriteEngine On
   RewriteCond %{HTTPS} !=on
   RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
   Header always set Content-Security-Policy "upgrade-insecure-requests;"

  • 503 Users Found This Useful

Was this answer helpful?

Related Articles

Can you write a script for me?

We do not write scripts but will be more than happy to guide you in the right direction. Most the...

How do I remove a web disk?

In Windows, go to My Network Places on your PC, find the connection, right click and delete....

How can I change the default page / document?

Create a .htaccess file, include the below information into it and upload it to the public_html...

Add Flash Chat to your Website

We ran into this website recently which allows you to easily insert a flash chat room into your...

Why is the server load status red?

The server load status will be red if the server is under a little more stress than usual. This...