热门:网页模板.net视频教程JQueryMVCjsonExtJs源码示例三级联动JQuery菜单
您现在的位置:.Net中文社区>> .Net编程>>正文内容

.net伪静态的配置的简单说明

发布时间:2009年09月15日点击数: xiaoxiaoniao

webconfig文件的配置

<RewriterConfig>
    <Rules>
      <!-- 规则,可以使用正则表达式 -->
      <RewriterRule>
        <LookFor>~/User_Sc_all.html</LookFor>
        <SendTo>~/Users_Sc.aspx</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/Product_ShowInfo_all(.[0-9]*)\.html</LookFor>
        <SendTo>~/Product_ShowInfo.aspx?pID=$1</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/Product_ShowInfo1_all(.[0-9]*)\.html</LookFor>
        <SendTo>~/Product_ShowInfo1.aspx?pID=$1</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/wjNews_Class_(\d{1,6})_(\d{1,6})\.html</LookFor>
        <SendTo>~/wjNews_Class.aspx?page=$1&amp;Big_Id=$2</SendTo>
      </RewriterRule>
                                                 
               </Rules>
  </RewriterConfig>
 <system.web>

页面上访问的时候跳转页面response.redirect("~/Users_Sc._all.html");

url里面显示的是Users_Sc_all.html.

而实际是是访问的Users_Sc.aspx页面.

本站热点业务

更多模板/案例展示

关于我们 | 联系我们 | 团队日志 | 网站地图 | 网站合作