Redirect http to https


Redirect all pages on a site from http to the more secure https version..

In .htaccess or the .conf file for the domain, add this..

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


  Tags:

Looking for great online sysadmin training in Linux, Security & Hacking and many others?

Back