利用URLRewriting.dll实现asp.net页面伪静态!(不用安装Rewriter)

configuration>                       
 <configSections>           
  <!-- The <configSections> element must contain a <section> tag for the <RewriterConfig> section element.
    The type of the section handler is RewriterConfigSerializerSectionHandler, which is responsible for
      deserializing the <RewriterConfig> section element into a RewriterConfig instance... -->
  <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
 </configSections>     
 <RewriterConfig>               
  <Rules>     
   
   <RewriterRule>
    <LookFor>~/index.html</LookFor>
    <SendTo><![CDATA[~/index.aspx]]></SendTo>
   </RewriterRule>
   <RewriterRule>
    <LookFor>~/blog/Article/(\d+).html</LookFor>
    <SendTo><![CDATA[~/blog/Article/ArticleView.aspx?id=$1]]></SendTo>
   </RewriterRule>
   <RewriterRule>
    <LookFor>~/blog/Pic/(\d+).html</LookFor>
    <SendTo><![CDATA[~/blog/Pic/PicView.aspx?id=$1]]></SendTo>
   </RewriterRule>
   
   <RewriterRule>
    <LookFor>~/Album/(\d+).html</LookFor>
    <SendTo><![CDATA[~/Album/Html/list_$1.html]]></SendTo>
   </RewriterRule>
   
   <RewriterRule>
    <LookFor>~/Search/Search.html</LookFor>
    <SendTo><![CDATA[~/Search/Search.aspx]]></SendTo>
   </RewriterRule>-->
   
   <!-- Reg
   <RewriterRule>
    <LookFor>~/Member/RegisterTerm.html</LookFor>
    <SendTo><![CDATA[~/Member/RegisterTerm.aspx]]></SendTo>
   </RewriterRule>
   <RewriterRule>
    <LookFor>~/Member/RegisterAccount.html</LookFor>
    <SendTo><![CDATA[~/Member/RegisterAccount.aspx]]></SendTo>
   </RewriterRule>-->
   
   <!-- Meet
   <RewriterRule>
    <LookFor>~/Meet/index.html</LookFor>
    <SendTo><![CDATA[~/Meet/index.aspx]]></SendTo>
   </RewriterRule>-->
   
   <!-- Good
   <RewriterRule>
    <LookFor>~/Good/index.html</LookFor>
    <SendTo><![CDATA[~/Good/index.aspx]]></SendTo>
   </RewriterRule>-->
  </Rules>
 </RewriterConfig>
 <system.web>
  <!--Ajax-->
  <httpHandlers>
   <add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro" />
  </httpHandlers>
  <httpModules>
   <!-- 地址改写 -->
   <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" />
   

 

1     以上内容写到web.config里面   然后URLRewriting.dll文件放到bin目录里面  

2.  然后iis配置里面添加一个html的拓展名,文件指向.net的文件 ,就是和asp.net的拓展名的文件一样

 

 

 

这样就完成url重写 ,就不需要安装isapi rewrite那么麻烦了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
rewriter.parallelExpandForRelNode(relAfterRBO, context)是Apache Calcite中的一个方法,它用于将一个经过规则优化后的关系代数表达式(RelNode)并行扩展为物理计划(PhysicalPlan)。 在关系型数据库中,查询优化的过程包括逻辑优化和物理优化两个阶段。逻辑优化阶段将SQL查询转换为关系代数表达式,然后使用一系列规则对表达式进行优化,以提高查询性能。物理优化阶段则将优化后的关系代数表达式转换为物理执行计划,即确定如何在数据库中实际执行查询。 在Apache Calcite中,Rewriter类负责对关系代数表达式进行规则优化。经过规则优化后,RelNode对象包含了一系列的规则节点,但是它们并没有被转换为实际的执行计划。此时,需要使用parallelExpandForRelNode方法将RelNode对象并行扩展为物理计划。 parallelExpandForRelNode方法接受两个参数:一个是经过规则优化后的RelNode对象,另一个是扩展上下文(Context)。它的主要作用是将RelNode对象转换为一个ParallelExecutor对象,该对象可以并行执行查询计划,并返回执行结果。 在转换过程中,parallelExpandForRelNode方法会根据RelNode对象中的节点类型,使用对应的RelVisitor对象进行转换。例如,如果RelNode节点表示一个排序操作,parallelExpandForRelNode方法会使用SortPhysRule类将其转换为一个排序物理操作(SortPhysical)。 总的来说,parallelExpandForRelNode方法是Apache Calcite中将关系代数表达式转换为物理计划的重要方法之一。它能够充分利用并行计算资源,提高查询性能,是分布式数据库系统中不可或缺的一环。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值