Quantcast
Channel: Linux Server | cPanel | WebHosting
Viewing all articles
Browse latest Browse all 16

Redirect HTTP to HTTPS using .htaccess file

$
0
0

To redirect all the pages on your site from http to https, simply add the following code to the .htaccess file in the document root of your site:

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

Hope this helps! :)


Viewing all articles
Browse latest Browse all 16

Trending Articles