跪急求 asp.net如何重写url ,全部转化成.html 或者其他也可以只要有代码或者实例!谢谢!
3个回答
展开全部
下载这野伏个:URLRewriter.dll;
然后再webconfig里配置:(例子)
<RewriterRule>
<LookFor>~/唤缺index.html</LookFor>
<SendTo>~/index.aspx</SendTo>
<颂链携/RewriterRule>
<RewriterRule>
<LookFor>~/rongzi365/news/(.[0-9]*)\.html</LookFor>
<SendTo>~/rongzi365/news.aspx?tid=$1</SendTo>
</RewriterRule>
然后再webconfig里配置:(例子)
<RewriterRule>
<LookFor>~/唤缺index.html</LookFor>
<SendTo>~/index.aspx</SendTo>
<颂链携/RewriterRule>
<RewriterRule>
<LookFor>~/rongzi365/news/(.[0-9]*)\.html</LookFor>
<SendTo>~/rongzi365/news.aspx?tid=$1</SendTo>
</RewriterRule>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询