打印本页〗〖打印选项
asp.net 程序中 Rewrite 功能实现方法
在.net 程序中实现 Rewrite 功能可以在 webconfig 中的 system.webServer 节点中加入以上内容就可以

实现转换。
<rewrite>
      <rules>
           <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
                <match url="^([^/]+)/([^/]+)/([^/]+)/?$" />
                  <conditions>
                       <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"

/>
                  </conditions>
                <action type="Rewrite" url="index.aspx?title={R:1}&amp;id={R:2}&amp;mode=

{R:3}" />
           </rule>
      </rules>
</rewrite>

以上代码仅供参考,请根据您程序中的实际情况进行修改。



文章作者:未知