ở footer mình có chèn link quảng cáo cho một trang khác ko có https, nên trang của mình ko hiển thị https màu xanh, nếu mình xóa link đó thì https của mình xanh luôn. làm thế nào để khắc phục được bạnLọ mọ tìm test và cuối cùng tìm được một cái chạy ok, có thể là tùy site. Ở đây mình sẽ hướng dẫn ai đang có nhu cầu thì táng zô, sửa dụng file htaccess nhé các thím
Nhét đoạn mã này zô file htaccess
Mã:RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
File hoàn chỉnh với www ví dụ với tinhte.vn
Mã:# Mod_security can interfere with uploading of content such as attachments. If you # cannot attach files, remove the "#" from the lines below. #<IfModule mod_security.c> # SecFilterEngine Off # SecFilterScanPOST Off #</IfModule> ErrorDocument 401 default ErrorDocument 403 default ErrorDocument 404 default ErrorDocument 405 default ErrorDocument 406 default ErrorDocument 500 default ErrorDocument 501 default ErrorDocument 503 default <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] RewriteCond %{HTTP_HOST} !^www.tinhte\.vn$ [NC] RewriteRule ^(.*)$ http://www.tinhte.vn/$1 [R=301,L,QSA] # If you are having problems with the rewrite rules, remove the "#" from the # line that begins "RewriteBase" below. You will also have to change the path # of the rewrite to reflect the path to your XenForo installation. #RewriteBase /xenforo # This line may be needed to enable WebDAV editing with PHP as a CGI. #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L] RewriteRule ^.*$ index.php [NC,L] </IfModule>
Và một cái nữa là ta thống nhất về www or none-www bằng code dưới đây
Mã:rewrite to www. Code: RewriteCond %{HTTP_HOST} !^www.example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L,QSA] or to non-www Code: RewriteCond %{HTTP_HOST} !^example\.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [R=301,L,QSA]
dakhucquan.net
MasterCorporal
lên bài đi tổ tông ơihttps://vnsimulator.com/
Của e dùng VPS nginx. Bác nào cần config thì e tìm lại rồi e chỉ chứ làm lâu rồi e cũng k nhớ nữa
Chỉ nginx thôi nha, chứ Apache thì config .htaccess khác e chưa làm, chưa tìm hiểu nên ko biết.
sonvu989
Gefreiter
chào mọi người !
Cần mọi người trợ giúp tý
Web mình là chogoviet.net mới chạy https . mình có gặp lỗi như sau khi gõ trực tiếp vào địa chỉ web chogoviet.net thì chuyển hướng ngay đến www.chogoviet.net ( không mong muốn )
mình phải gõ hẳn https://chogoviet.net/forums/ thì nó mới như mình mong muốn .
Vậy mình muốn gõ chogoviet.net nó chuyển hướng luôn đến https://chogoviet.net/forums/ . Mọi người giúp với !
Cần mọi người trợ giúp tý
Web mình là chogoviet.net mới chạy https . mình có gặp lỗi như sau khi gõ trực tiếp vào địa chỉ web chogoviet.net thì chuyển hướng ngay đến www.chogoviet.net ( không mong muốn )
mình phải gõ hẳn https://chogoviet.net/forums/ thì nó mới như mình mong muốn .
Vậy mình muốn gõ chogoviet.net nó chuyển hướng luôn đến https://chogoviet.net/forums/ . Mọi người giúp với !
NDK
MasterSergeant
Bạn sửa lại Board Information chưa , mục Home page URL ýchào mọi người !
Cần mọi người trợ giúp tý
Web mình là chogoviet.net mới chạy https . mình có gặp lỗi như sau khi gõ trực tiếp vào địa chỉ web chogoviet.net thì chuyển hướng ngay đến www.chogoviet.net ( không mong muốn )
mình phải gõ hẳn https://chogoviet.net/forums/ thì nó mới như mình mong muốn .
Vậy mình muốn gõ chogoviet.net nó chuyển hướng luôn đến https://chogoviet.net/forums/ . Mọi người giúp với !
sonvu989
Gefreiter
mình sửa rồi. không có www mà nó cứu ref về đó.Bạn sửa lại Board Information chưa , mục Home page URL ý
vntoday007
Corporal
chào mọi người !
Cần mọi người trợ giúp tý
Web mình là chogoviet.net mới chạy https . mình có gặp lỗi như sau khi gõ trực tiếp vào địa chỉ web chogoviet.net thì chuyển hướng ngay đến www.chogoviet.net ( không mong muốn )
mình phải gõ hẳn https://chogoviet.net/forums/ thì nó mới như mình mong muốn .
Vậy mình muốn gõ chogoviet.net nó chuyển hướng luôn đến https://chogoviet.net/forums/ . Mọi người giúp với !
Code hoàn chỉnh của bạn trong file .htaccess bạn thử copy rồi save lại xem
Mã:
# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
RewriteCond %{HTTP_HOST} !^chogoviet\.net$ [NC]
RewriteRule ^(.*)$ http://chogoviet.net/$1 [R=301,L,QSA]
# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo
# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
MrWonderful
Private
Cái redirect www thì nó chạy mà cái http to https nó không chạy bạn nhỉ?
kols.top
KOLs Hỗ Trợ Bán Hàng
Hướng dẫn sử dụng
| XenForo 1 | XenForo 2 |
| Translate by PVS | |
| Xenforo là gì? | |
| Xây dựng MXH bằng Xenforo | |

