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:
Rocket 1h là thực phẩm chức năng giúp tăng cường sinh lý nam có nguồn gốc hoàn toàn từ dược liệu tự nhiên. Rất nhiều nam giới đã tuyển lựa Rocket 1h như một phương thuốc hữu hiệu để cải thiện tình...
Nguyên nhân của cặp đôi nam nữ mua...