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:
Trứng rung điều khiển từ xa Vibrator Spark Of Love Sản phẩm trứng rung bluetooth có điều khiển từ xa này được thiết kế với tông màu Rose Gold viền kim khí trải qua. kích tấc 7,4cm x 3,5cm giúp trứng...
TOP 3 trùy rung điều khiển từ xa...