2010-06-11 112 views
2

IIS URL重写模块附带3内置functions字符串函数

* ToLower - returns the input string converted to lower case. 
* UrlEncode - returns the input string converted to URL-encoded format. This function can be used if the substitution URL in rewrite rule contains special characters (for example non-ASCII or URI-unsafe characters). 
* UrlDecode - decodes the URL-encoded input string. This function can be used to decode a condition input before matching it against a pattern. 

的函数可以被调用,通过使用以下语法: {函数名:any_string}

的问题是:这个名单通过引入更换功能是可用于重写规则的动作或状态内改变的值被扩展?

框架问题的另一种方法:有什么办法对使用此模块的URL进行全局替换吗?

看来,你只限于使用正则表达式和反向引用来构建字符串 - 即没有查找/替换机制来替换的Y的{REQUEST_URI} X的每一个例如,知道有多少实例。

我已经快速浏览了2.0 RTW中的可扩展性introduced,并且没有看到任何介绍此的“简单”方法。

回答