100%(3)3 out of 3 people found this document helpful
This preview shows page 99 - 102 out of 195 pages.
Unlike with Rewrite policies only one Responder policy can apply to a given request. The GoTo expression is set to end. Responder policies can also be used to DROP or RESET requests and can therefore replace content filtering.
100 Exercise 3-8: Responder Policy - Redirect using String Maps (CLI) Introduction: In this exercise, you will learn to use a responder policy to redirect content based on a string map. You will use the command-line interface to perform this exercise. Company ABC has identified that they want to implement some navigational shortcuts for users so that when certain paths are accessed on the RBG virtual server, users will be redirected to a new location. Some parts of the web site that users were used to going to as or are now hosted on separate web applications. To allow users and applications that are still using the old paths to be directed to the new locations, Responder policies should be implemented. This exercise will not follow the above example exactly. For demonstration purposes, this exercise will redirect to public search websites for Google, Bing, and Yahoo. The requirements for this scenario are: The Responder policies will only apply to the lb_vsrv_rbg virtual server. The following paths should redirect to their corresponding URL: /google /bing /yahoo All other content on the RBG virtual server should continue to be served as normal from lb_vsrv_rbg. About String Maps: String Maps are hash tables that are indexed by a key. Contents in string maps consist of key-value pairs. Typically, a string map is used to look up a key to find its associated value. String Maps can be used with Responder or Rewrite policies (and other advanced policy features). String Maps are very useful when trying to consolidate a large number of repetitive policies that perform the same type of comparisons. For example, it would take three Responder policies and actions to perform the redirects listed above normally: Responder Policy Responder Action rs_pol_sendto_google Expr: http.req.url.path.contains("/google") rs_act_sendto_google Action Type: Redirect Target: "" rs_pol_sendto_bing Expr: http.req.url.path.contains("/bing") rs_act_sendto_bing Action Type: Redirect Target: "" rs_pol_sendto_yahoo Expr: http.req.url.path.contains("/yahoo") rs_act_sendto_yahoo Action Type: Redirect
101 Target: "" In the above example, three separate Responder policies can be used. However, each one of the policies is making the same comparison and the actions are performing the same type of response: If path contains "x", redirect to "y". If a string map is defined with keys that correspond to the paths (/google, /bing, /yahoo) and then the value of each key is the intended redirect target.