Loading...
Changes Saved.
Error Occurred!

Hướng dẫn: chuyển đổi http sang https !

Khi truy cập http://example.com bạn cầu tự chuyển đổi ép tất cả các link không có https thành https://example.com, bạn cần thêm các dòng sau vào .htaccess của website để 
rewrite lại. Lưu ý: thay example.com thành domain của bạn.
#302 Redirect of http://example.com to https://www.example.com
RewriteEngine On 
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
 
#301 Redirect of http://example.com to https://www.example.com
RewriteEngine On 
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]



Related Articles