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

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

转载于:https://www.cnblogs.com/buaaboyi/archive/2011/01/13/1934434.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值