记F5添加应用负载写法

新建一个应用_pool



 

 再建irules



 

irule写法

when HTTP_RESPONSE {
if {[HTTP::is_redirect]}{        
HTTP::header replace Location [string map {:port/ /} [HTTP::header value Location]]
HTTP::header replace Location [string map {:port/ /} [HTTP::header value Location]]
}
}

when HTTP_REQUEST {
  if {[HTTP::uri] starts_with "/上下文" } {
    pool pool_name
  } elseif {[HTTP::uri] starts_with "/上下文" } {
    pool pool_name
  } else {
    pool pool_name
  }
}

 

猜你喜欢

转载自hugoren.iteye.com/blog/2197149