Redirect http to https automatically

REDIRECT HTTP TO HTTPS AUTOMATICALLY

If you need to create a .htaccess file, you can use your control panel's file manager.

Using the following code in your .htaccess file automatically redirects visitors to the HTTPS version of your site:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

If you have an existing .htaccess file:

  • Do not duplicate RewriteEngine On.
  • Make sure the lines beginning RewriteCond and RewriteRule immediately follow the already-existing RewriteEngine On.
  • cpanel, domain, Hosting
  • 0 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats

DNS Management - How To Edit MX Records

DNS Management - How To Edit MX Records A mail exchanger (MX) record is a type of DNS record...

Cpanel Exim How To Clear The Mail Queue

  Cpanel Exim How To Clear The Mail Queue Here’s the proper way to clear the exim mail...

Creating a cPanel User Account

Creating a cPanel User Account To create a new account go toWHM >> Account Functions...

How can I limit access to certain directories on my server by requiring a password using cPanel/WHM?

How can I limit access to certain directories on my server by requiring a password using...

How do I backup my entire site in Cpanel?

How do I backup my entire site in Cpanel? Entire accounts can be backed up by doing the...