asp.net程序中Rewrite功能实现方法
Http://www.Egocbd.com 点击数: 更新时间:2009-12-18 19:26:43
在.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}&id={R:2}&mode=
{R:3}" />
</rule>
</rules>
</rewrite>
以上代码仅供参考,请根据您程序中的实际情况进行修改。
上一篇:虚拟主机上传网页的注意事项下一篇:常见FTP报错信息及说明