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:
Ngọc Bích xanh bản chất thuộc dòng đá đá hoa (jade). Và cẩm thạch là tên gọi chung của ngọc bích. Vì thực chất chúng thuộc dòng đá đa khoáng được hình thành từ chất Silicat dưới dạng dioxy. Ngọc bích...
Chia sẻ Vòng tay ngọc bích xanh là...