zoukankan      html  css  js  c++  java
  • IIS URL Rewrite 2.0,url重写,伪静态

    IIS URL Rewrite 2.0出来好像不短时间了,由于也没什么特别需求,也就没对他有研究兴趣。

    最近维护另外一个小组开放的程序,发现其使用的就是IIS URL Rewrite 2.0了,而起rewrite规则都写在webconfig中,这就不由得我不管这事了。

    曾经为了避免频繁修改webconfig而导致的站点重启,重写了MS提供的IIS URL Rewrite 1.1,讲规则存储在单独的数据文件中,再用个文件缓存依赖来实现实时修改。

    而如今2.0的配置还写在webconfig里头,难道又想让我重新2.0的东东。

    找到了2.0的相关资料,也找到了其源代码,发现其是支持扩展的,支持规则存于其他数据文件的。

    http://www.iis.net/download/URLRewrite  详细信息参考官方文档了。

    这里列下2.0的特点:

    Features

    • Rules-based URL rewriting engine
    • Rules-based response rewriting engine
    • Support for custom .NET rewrite providers
    • Regular expression pattern matching
    • Wildcard pattern matching
    • Global and distributed rewrite rules
    • Rewriting within the content of specific HTML tags
    • Pre-conditions for outbound rules
    • Access to server variables and HTTP headers
    • Rewriting of server variables and HTTP request headers
    • Rewriting of HTTP response headers
    • Allow list for server variables
    • HtmlEncode function
    • Built-in rule templates
    • Reverse proxy rule template
    • Rule templates for Search Engine Optimization
    • Various rule actions including redirect and request abort
    • Tracking capture groups across rule conditions
    • Logging of rewritten URLs
    • Updated user interface in IIS Manager
    • Integrated user interface for managing rewrite rules and rewrite maps
    • Integrated user interface for importing of Apache mod_rewrite rules
    • Integrated user interface for testing regular expression and wildcard patterns
    • Support for IIS kernel-mode and user-mode output caching
    • Lowercase conversion function
    • Rewrite maps to generate the substitution URL during rewriting
    • Failed Request Tracing support

    好处多多,可以了解下,有些方面估计还用得到。

  • Support for custom .NET rewrite providers

    这玩意支持让你方便修改存储位置。

查看全文
  • 相关阅读:
    Servlet(2):通过servletContext对象实现数据共享
    Servlet(1):Servlet介绍
    MyBatis(4):使用limit实现分页
    MyBatis(3):优化MyBatis配置文件
    MyBatis(2):CRUD操作
    SpringMVC(4):文件上传与下载
    SpringMVC(3):AJAX
    什么是开发环境、测试环境、生产环境、UAT环境、仿真环境
    SQL SERVER添加表注释、字段注释
    SQL中行转列(PIVOT)与列转行(UNPIVOT)
  • 原文地址:https://www.cnblogs.com/buaaboyi/p/1934434.html
  • Copyright © 2011-2022 走看看