Thủ Thuật Đoạn Code đưa web thành www và SSL

Discussion in 'Tips and Guides' started by PhuongBinzz, Oct 31, 2019.

  1. PhuongBinzz

    PhuongBinzz Thượng Đế

    Joined:
    Jul 21, 2016
    Messages:
    854
    Likes Received:
    246
    Trophy Points:
    43
    Gender:
    Male
    Occupation:
    ở đợ
    Location:
    308 Canal St New York
    Home Page:
    bạn chỉ cần thêm đoạn code phía dưới. ngay lậ tức web sẽ thêm www vào trước domain mà không cần làm bất cứ điều gì khác phức tạp
    thêm đoạn dưới vào file .htaccess

    PHP:
    RewriteCond %{HTTPSoff
    RewriteRule 
    .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
     
    Last edited: Oct 31, 2019
    PVS likes this.
  2. danchoi

    danchoi Thượng Đế

    Joined:
    Oct 31, 2019
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    sài gòn
    Home Page:
    thnaks
     
  3. NDK

    NDK Cộng Sự Đắc Lực

    Joined:
    Mar 16, 2015
    Messages:
    827
    Likes Received:
    680
    Trophy Points:
    93
    Gender:
    Male
    Occupation:
    SEO Executive
    Location:
    TP.HCM
    file .htaccess nằm đâu zợ :D
     
  4. PhuongBinzz

    PhuongBinzz Thượng Đế

    Joined:
    Jul 21, 2016
    Messages:
    854
    Likes Received:
    246
    Trophy Points:
    43
    Gender:
    Male
    Occupation:
    ở đợ
    Location:
    308 Canal St New York
    Home Page:
    nawmf trong tym =))
     

Share This Page