Forcing HTTPS on All Traffic

One of the many functions you can perform via .htaccess is the 301 redirects, which permanently redirects an old URL to a new one. You can activate the feature to force HTTPS on all incoming traffic by following these steps:

  1. Go to File Manager in your hosting panel and open .htaccess inside the public_html folder. If you can’t locate it, make sure to create or unhide it.
  2. Scroll down to find RewriteEngine On and insert the following lines of code below it:

 

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  • ssl
  • 0 Los Usuarios han Encontrado Esto Útil
¿Fue útil la respuesta?

Artículos Relacionados

How to find cPanel username & Password?

To find any web hosting account's information like username/password, just login to your client...

Login to cPanel

If you know the right username and password for your cPanel hosting account with us you may login...

Upgrade/Downgrade Account

To upgrade or downgrade a hosting account go to Services > My Services > View Details [for...

How to Connect to the MySQL Database?

In order for your MySQL database to work as intended, it will need a script calling or querying...

What is a Subdomain Name? How Do I Create and Delete One?

It is not always necessary to register a new domain name when the one you already own will work...

Powered by WHMCompleteSolution