Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Quản trị Server web IIS, FTP Server (http://quantrinet.com/forum/forumdisplay.php?f=87)
-   -   Hướng dẫn redirect www to non-www (http://quantrinet.com/forum/showthread.php?t=10320)

hoctinhoc 01-07-2022 10:35 AM

Hướng dẫn redirect www to non-www
 
How to redirect www to none www

Hướng dẫn cấu hính chuyển hướng từ www qua không có www


Cách 1: Trong web.conf bạn thêm dòng sau


Mã:



<rewrite>
<rules>
  <rule name="Redirect to www" stopProcessing="true">
      <match url="(.*)" />
      <conditions trackAllCaptures="false">
        <add input="{HTTP_HOST}" pattern="^domain.com$" />
      </conditions>
      <action type="Redirect" url="{MapProtocol:{HTTPS}}://www.domain.com/{R:1}" />
  </rule>
</rules>
</rewrite>

Cách 2:


Tham khảo: https://www.namecheap.com/support/kn...http-to-https/


https://qawithexperts.com/article/as...-vice-vers/342


:battay:


Bây giờ là 12:45 AM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.