如何让全部的页面都是伪静态
如何让全部的页面都是伪静态.......求代码 --------------------编程问答-------------------- URLRewriter. --------------------编程问答-------------------- 顶起来 正解 --------------------编程问答-------------------- 求代码……求代码……求代码...无语。 --------------------编程问答-------------------- 1、在Web.Config的<system.web>和</system.web>添加以下节点:<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
2、在Web.Config的<configuration>和</configuration>添加以下节点:
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/d(\d+)\.html</LookFor> <!—被请求的伪静态地址-->
<SendTo>~/Default.aspx?MyID=$1</SendTo> <!—实际导向地址-->
</RewriterRule>
</Rules>
</RewriterConfig>
比如在配置文件里配置 --------------------编程问答-------------------- iis 7 urlwrite 微软自己的 --------------------编程问答-------------------- URLRewriter --------------------编程问答-------------------- 这个很简单一个URLRewrite, 然后在Web.config里面配置
LookFor
SendTo
补充:.NET技术 , ASP.NET