需求:因为vs_mail05服务器宕机,无法处理 http://oamail05.ycdc.com/ 的请求,将到vs_mail05 重写到 vs_mail06 ,保持请求url不更改
操作步骤
## 添加 action为 rewrite_host_mail05_mail06_act
add rewrite action rewrite_host_mail05_mail06_act replace "HTTP.REQ.HEADER(\"Host\")" "\"oamail06.ycdc.com\""
## 添加policy,关联 action
add rewrite policy rewrite_host_mail05_mail06_pol "HTTP.REQ.HEADER(\"Host\").CONTAINS(\"oamail05.ycdc.com\")?? " rewrite_host_mail05_mail06_act
## 关联policy到 lbvs
bind lb vserver lbs_oamail05 -policyName rewrite_host_mail05_mail06_pol -priority 10 -gotoPriorityExpression 20 -type REQUEST