Link Search Menu Expand Document

.htaccess file

This file is a configuration file that controls how a webserver responds to various requests. It is supported by several webservers, including the popular Apache webserver used by most commercial web hosting providers.

The file operates at the level of a directory, allowing them to override global configuration settings of .htaccess directives higher in the directory tree.

Force https:// on CPanel

To force your website address from default http:// to https:// use the following:

RewriteEngine On 
RewriteCond %{HTTPS} !on 
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ 
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ 
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Redirects