- Trang khách hàng
- Câu hỏi thường gặp
- Sử dụng .htaccess
- Hướng dẫn redirect http sang https cho wordpress
Thư mục
Thư mục
Hướng dẫn redirect http sang https cho wordpress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
hoặc
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Câu trả lời này hữu ích?
Bài viết liên quan
Khi khách truy cập vào 1 trang không tồn tại trên Website, nếu không muốn xuất hiện lỗi 404, bạn...
Khi bạn có kế hoạch chuyển đổi từ http://superhost.vn/ sang http://superhost.vn/abc mà không muốn...
Redirect toàn bộ trang web:RewriteEngine OnRewriteBase /RewriteCond %{HTTP_HOST} !newdomain.com$...
Đối với mã nguồn Xenforo, thông thường bạn có thể dùng chứng thực với PHP để tạo lớp bảo mật...
2. product.php?id=12 —> product/ipod-nano/12.html Một SEOer chuyên nghiệp luôn biết khéo léo...