Thêm đoạn code này vào file .htaccess
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L] </IfModule>
Nguồn: wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/
Thêm đoạn code này vào file .htaccess
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L] </IfModule>