Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1019923
  • 博文数量: 157
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1388
  • 用 户 组: 普通用户
  • 注册时间: 2015-04-09 15:37
文章分类

全部博文(157)

文章存档

2023年(9)

2022年(2)

2021年(18)

2020年(7)

2017年(13)

2016年(53)

2015年(55)

我的朋友

分类: 服务器与存储

2015-07-06 11:54:32

遇到的问题:
remap.config中配置regex_map http://(.*)   不能映射所有请求,如我的请求就不能通过前面的配置完成映射。
原因:
我修改配置为map   则可以成功映射我的请求,找出区别map和regex_map的配置有什么不同,细读remap的配置文档上面的说明部分,发现下面标黄的说明,regex_map http://(.*) 中的(.*)只代表host,不含端口号、路径等信息:
【Regex support: Regular expressions can be specified in the rules with the
 following limitations:
1) Only the host field can have regexes - the scheme, port and other
      fields cannot.
2) The number of capturing sub-patterns is limited to 9;
    this means $0 through $9 can be used as substitution place holders ($0
      will be the entire input string)
3) The number of substitutions in the expansion string is limited to 10.】
解决问题:
修改符合我的配置为:regex_map  









1. remap.config的作用:
阅读(2531) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~