home, PHP, updated

How to redirect http to https?

To redirect all your traffic from http to https, you can put following code in your .htaccess file.


RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

Related Articles

post a comment