新安数据

您的当前位置:网站首页 » 帮助中心» 主机相关

asp.net程序中Rewrite功能实现方法

来源:新安数据类型:帮助文件 更新:2013-7-25 点击:23180

在.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>

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

上一篇文章:常用的伪静态规则下一篇文章:FTP 错误详解

我们很乐意帮助您!请联系在线客服或致电我们。7×24小时客服热线: 0551-62886237