Help Help ! !

nghiapro

MasterCorporal
Tham gia
23/06/2015
Bài viết
220
Được Like
101
Bạn nào có thể giúp mình auto từ http sang https được không ? .
Mình làm đủ kiểu nhưng vẩn không được !
Thêm vào htaccess cái code này mà nó ko chuyển nhỉ :?
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 500 default

<IfModule mod_rewrite.c>
    RewriteEngine On

    #    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 /

    #    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]
        RewriteCond %{HTTP:X-Forwarded-Proto} !https [OR]
        # conditon to force non-www RewriteCond %{HTTP_HOST} ^www\.sa-mp\.click
        RewriteCond %{HTTP_HOST} ^sa-mp.click
        RewriteRule ^(.*)$ https://www.sa-mp.click%{REQUEST_URI} [L,R=301]
       
</IfModule>
 

CNTT01

Snow Flower ✔
Tham gia
06/07/2015
Bài viết
803
Được Like
686
Bạn mở file .htaccess ở thư mục root thêm vào đoạn sau trước </IfModule>

Mã:
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
 
  • Like
Reactions: THB

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mobile/Zalo: 0906081284

Telegram: anhanhxf

Chỉ nhận web nội dung lành mạnh

Nhà Tài Trợ

Mút Xốp Không Gian
Mút Sofa Không Gian
Top Bottom