Breaking

Tuesday, January 9, 2018

Redirect http to https permanently in apache

Can be use in both virtualhost and HTACCESS file.

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

No comments: