Home » Categories » Multiple Categories |
Sử dụng .htaccess để chuyển hướng tên miền từ HTTP sang HTTPS |
Article Number: 25 | Rating: Unrated | Last Updated: Thu, Jul 21, 2016 at 11:26 AM
|
Hướng dẫn chuyển hướng tên miền từ HTTP sang HTTPS bằng file .htaccess.Cách 1: chuyển hướng tên miền chính từ HTTP sang HTTPS bằng cách tắt cổng 80.
Cách 2: Chuyển hướng tất cả tên miền chính và các trang con từ HTTP sang HTTPS bằng .htaccess.
English Version: How to force HTTPS using the .htaccess file
Forcing visitors to use SSL can be accomplished through your .htaccess file using mod_rewrite. If you’d like more information on mod_rewrite please read our article. To force all web traffic to use HTTPS insert the following lines of code in the .htaccess file in your website’s root folder. Important:If you have existing code in your .htacess, add this above where there are already rules with a similar starting prefix.
To force a specific domain to use HTTPS, use the following lines of code in the .htaccess file in your website's root folder:
If you want to force SSL on a specific folder you can insert the code below into a .htaccess file placed in that specific folder:
|
Attachments
There are no attachments for this article.
|
Comments There are no comments for this article. Be the first to post a comment. |
Hướng dẫn cài đặt chứng chỉ số ssl (https) trên zimbra mail bằng command line
Xem 371 - Đăng ngày Sun, Mar 22, 2020
Tạo cổng chứng thực cho website hạn chế DDoS tạm thời với .htaccess và .htpasswd
Xem 1205 - Đăng ngày Sat, Jan 30, 2016
Hướng dẫn cài đặt chứng chỉ SSL (https) với Let’s Encrypt trên VPS/Server sử dụng DirectAdmin
Xem 3091 - Đăng ngày Tue, Apr 7, 2020
Hướng dẫn kết nối sFTP bằng FileZilla
Xem 2907 - Đăng ngày Sat, Feb 27, 2016
|