Cloud VPS

Direct domain www sang non-www giao thức https bằng file .htaccess

Sử dụng 1 trong 2 cách dưới đây

Cách 1: Áp dụng cho website bằng WordPress

 

Cài đặt Plugin Really Simple SSL

Cách 2: Tùy chỉnh .htaccess

 

Thêm vào đoạn sau: (**Lưu ý:Thay tenten.vn bằng tên miền của Quý Khách)

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}:443%{REQUEST_URI} [END]

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

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?option=$1 [L,QSA]

 
Như vậy là hoàn tất Việc cài đặt SSL cho domain của Quý Khách rồi đó.

Bài viết liên quan

Back to top button