Di chuyển từ www sang dạng không có www khi khách hàng truy cập vào web của bạn ở trang HTTPS hoặc HTTP rất đơn giản với file .htaccess VD: Khi bạn truy cập vào web https://www.salegiatot.com tự động web sẽ redirect sang https://salegiatot.com Khi bạn truy cập vào web http://www.itseovn.com tự động web sẽ rediect sang https://itseovn.com thì làm như sau: Với HTTPS: Ta add code sau vào file .htaccess Mã: RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] Với HTTP thường Ta add code sau vào file .htaccess Mã: RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]