zoukankan      html  css  js  c++  java
  • RewriterConfig 配置

    <RewriterConfig>
        <Rules>
          <RewriterRule>
            <LookFor>~/(\w+)\.html</LookFor>
            <SendTo>~/$1.aspx</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/company/(\w+)\.html</LookFor>
            <SendTo>~/company/$1.aspx</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(index|category|userreg|infoadd|newslist|web|weblist|help)-(\d*)\.html</LookFor>
            <SendTo>~/$1.aspx?cid=$2</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(comlist)-(\d*)\.html</LookFor>
            <SendTo>~/$1.aspx?iid=$2</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(company)-(\d*)\.html</LookFor>
            <SendTo>~/$1.aspx?cid=$2</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(ComProduct)-(\d*)\.html</LookFor>
            <SendTo>~/$1.aspx?cid=$2</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(ComCouponsList)-(\d*)\.html</LookFor>
            <SendTo>~/$1.aspx?cid=$2</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(comlist)-(\d*)-(\d*)\.html</LookFor>
            <SendTo>~/$1.aspx?cid=$2&iid=$3</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(Comproductlist)-(\d*)-(\d*)\.html</LookFor>
            <SendTo>~/$1.aspx?cid=$2&tid=$3</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/company/(index|contact)-(\d*)\.html</LookFor>
            <SendTo>~/company/$1.aspx?comid=$2</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/company/(news|product|coupons|Photos|ProductOrder)-(\d*)\.html</LookFor>
            <SendTo>~/company/$1.aspx?id=$2</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/company/(about|photoslist|newslist|comments|couponslist|message|productlist)-(\d*)\.html</LookFor>
            <SendTo>~/company/$1.aspx?comid=$2</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/company/(productlist|newslist|photoslist)-(\d*)-(\d*)\.html</LookFor>
            <SendTo>~/company/$1.aspx?comid=$2&tid=$3</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/company/(\w+)-(\d*)-(\d*)\.html</LookFor>
            <SendTo>~/company/$1.aspx?comid=$2&id=$3</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(info|news|usercenter/comphotos|usercenter/comnews)-(\d*)\.html</LookFor>
            <SendTo>~/$1.aspx?id=$2</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(infolist|infoadd|infosave|infosearch|newssearch)-(\d*)-(\d*).html</LookFor>
            <SendTo>~/$1.aspx?cid=$2&tid=$3</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(newslist)-(\d*)-(\d*).html</LookFor>
            <SendTo>~/$1.aspx?cid=$2&nid=$3</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/(weblist)-(\d*)-(\d*).html</LookFor>
            <SendTo>~/$1.aspx?cid=$2&wid=$3</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/help-(\d*)-(hid|id)-(\d*).html</LookFor>
            <SendTo>~/help.aspx?cid=$1&$2=$3</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/usercenter/(\w+).html</LookFor>
            <SendTo>~/usercenter/$1.aspx</SendTo>
          </RewriterRule>
          <RewriterRule>
            <LookFor>~/usercenter/(ComProductOrder|ComViewProductOrder|UserViewProductOrder|ComCoupons|ComProduct)-(\d*).html</LookFor>
            <SendTo>~/usercenter/$1.aspx?id=$2</SendTo>
          </RewriterRule>
        </Rules>
      </RewriterConfig>
    

      

  • 相关阅读:
    struts2:JSP页面及Action中获取HTTP参数(parameter)的几种方式
    Wcf 双工通信的应用
    较完整的轮播图特效
    jQuery图片轮播的具体实现
    一种新的隐藏-显示模式诞生——css3的scale(0)到scale(1)
    你所不知的 CSS ::before 和 ::after 伪元素用法
    scale等比缩放才能做到看上去能让线条以中心点展开
    loading.io一个可以直接生成loading gif图标的站点
    按住ctrl键可以在新窗口打开图片
    背景图片等比缩放的写法background-size简写法
  • 原文地址:https://www.cnblogs.com/coxsoft/p/2140505.html
Copyright © 2011-2022 走看看