注:此代码只适用于IIS服务器,如需要将123.asp重定向到123.html,请使用以下代码。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect" stopProcessing="true">
<match url="^123.asp" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Redirect" url="123.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>