Mình vừa rồi cũng tìm mãi mới có cách hướng dẫn ở trên site nước ngoài, này post lại đây để cho bạn nào có cần tìm thì tham khảo ở đây nhé. Mình ko chuyên về asp.net
Code chuyển hướng 301
Mã:
<rewrite>
<rules>
<rule name="Canonical Host Name" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" negate="true" pattern="^tenmienMoi\.vn$" />
</conditions>
<action type="Redirect" url="http://tenmienMoi.vn/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
Code chỉ định chuyển hướng 1 link bất kỳ
Mã:
<rewrite>
<rules>
<rule name="[RULE NAME]" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny" trackAllCaptures="false">
<add input="{HTTP_HOST}{REQUEST_URI}" pattern="domain.comews.aspx" />
<add input="{HTTP_HOST}{REQUEST_URI}" pattern="www.domain.comews.aspx" />
</conditions>
<action type="Redirect" url="http://domain.vn/tin-tuc.html" redirectType="Permanent"/>
</rule>
</rules>
</rewrite>
chèn vào web.config
View more random threads:
Hướng dẫn vui nhộn về phương tiện nong lỗ đít Thuốc giãn hậu môn nghe có vẻ đáng sợ, nhưng đừng sợ! Hướng dẫn này sẽ đưa bạn qua hành trình hích khi dùng dụng cụ làm giãn lỗ đít, khiến nó trở...
Hướng dẫn vui nhộn về sản phẩm làm...