利用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
    评论
MySQL高可用(MGR)是一种在MySQL环境中实现高可用性和容错性的技术。下面是在Windows上使用MySQL Shell和MySQL Router搭建MySQL高可用(MGR)的具体实现步骤: 1. 确认你已经安装MySQL Shell和MySQL Router,并且它们都可以正常运行。 2. 打开MySQL Shell,使用以下命令连接到MySQL Server: ``` mysqlsh --uri root@localhost:3306 ``` 3. 创建一个新的ReplicaSet: ``` var mysqlx = session.getSchema('mysql').getClient(); mysqlx.shardCreate("myCluster") ``` 4. 添加节点到ReplicaSet中: ``` mysqlx.addShardInstance("root@localhost:3307", {group: "myCluster"}) mysqlx.addShardInstance("root@localhost:3308", {group: "myCluster"}) ``` 5. 启动MySQL Router,并配置它来连接到ReplicaSet: ``` mysqlrouter --bootstrap root@localhost:3306 --directory router --conf-use-rewriter=1 --conf-base-port=3000 --conf-dest-port=3306 --conf-target-auth=mysql_native_password --conf-source=mysql://root@localhost:3306 --conf-use-ssl=0 --conf-routing-strategy=round-robin --user=mysqlrouter --name=router ``` 6. 验证MySQL Router是否可以连接到ReplicaSet: ``` mysqlsh --uri mysqlrouter://router:mysqlrouter@localhost:3000 \sql SELECT * FROM performance_schema.replication_group_members; ``` 如果上述命令能够成功执行,并且返回所有节点的信息,则说明MySQL高可用(MGR)已经成功搭建。 注意:以上命令可能需要根据你的实际情况进行一些修改,例如用户名、密码、ReplicaSet名称等。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值