Request forwarding redirects a URL or host to a specific server pool.

Prerequisites

Verify that a Layer 7 HTTP virtual server is available. See Add Layer 7 HTTP Virtual Servers.

Load Balancer rules support REGEX for match types. PCRE style REGEX patters is supported with a few limitations on advanced use cases. When REGEX is used in match conditions, named capturing groups are supported. See Regular Expressions in Load Balancer Rules.

Procedure

  1. Open the Layer 7 HTTP virtual server.
  2. Click Request Forwarding > Add Rule to configure the load balancer rules for the HTTP Request Forwarding.
  3. From the drop-down list, select a match condition. Match conditions are used to match application traffic passing through load balancers. Multiple match conditions can be specified in one load balancer rule. Each match condition defines a criterion for application traffic.
    Supported Match Condition Description
    HTTP Request Method Match an HTTP request method.

    http_request.method - value to match

    HTTP Request URI Match an HTTP request URI without query arguments.

    http_request.uri - value to match

    HTTP Request URI Arguments

    Used to match URI arguments aka query string of HTTP request messages, for example, in URI http://exaple.com?foo=1&bar=2, the "foo=1&bar=2" is the query string containing URI arguments. In an URI scheme, query string is indicated by the first question mark ("?") character and terminated by a number sign ("#") character or by the end of the URI.

    http_request.uri_arguments - value to match

    HTTP Request Version Used to match the HTTP protocol version of the HTTP request messages

    http_request.version - value to match

    HTTP Request Header Used to match HTTP request messages by HTTP header fields. HTTP header fields are components of the header section of HTTP request and response messages. They define the operating parameters of an HTTP transaction.

    http_request.header_name - header name to match

    http_request.header_value - value to match

    HTTP Request Cookie Used to match HTTP request messages by cookie which is a specific type of HTTP header. The match_type and case_sensitive define how to compare cookie value.

    http_request.cookie_value - value to match

    HTTP Request Body Match an HTTP request body content.

    http_request.body_value - value to match

    Client SSL Match client SSL profile ID.

    ssl_profile_id - value to match

    TCP Header Port Match a TCP source or the destination port.

    tcp_header.source_port - source port to match

    tcp_header.destination_port - destination port to match
    IP Header Source Matches IP header fields in of HTTP messages. The source type must be either a single IP address, or a range of IP addresses, or a group. See Add a Group.
    • If IP Header Source is selected, with an IP Address source type, the source IP address of HTTP messages should match IP addresses which are configured in groups. Both IPv4 and IPv6 addresss are supported
    • If IP Header Source is selected with a Group source type, seelct the group from the drop-down list.

    ip_header.source_address - source address to match

    ip_header.destination_address - destination address to match
    Variable Create a variable and assign a value to the variable.
    Case Sensitive Set a case-sensitive flag for HTTP header value comparison. If true, case is significant when comparing HTTP body value.
  4. Select an action:
    Action Description
    HTTP Reject Used to reject HTTP request messages. The specified reply_status value is used as the status code for the corresponding HTTP response message. The response message is sent back to client (usually a browser) indicating the reason it was rejected.

    http_forward.reply_status - HTTP status code used to reject

    http_forward.reply_message - HTTP rejection message
    HTTP Redirect

    Used to redirect HTTP request messages to a new URL. The HTTP status code for redirection is 3xx, for example, 301, 302, 303, 307, etc. The redirect_url is the new URL that the HTTP request message is redirected to.

    http_forward.redirect_status - HTTP status code for redirect http_forward.redirect_url - HTTP redirect URL
    Select Pool

    Force the request to a specific server pool. Specified pool member's configured algorithm (predictor) is used to select a server within the server pool. The matched HTTP request messages are forwarded to the specified pool.

    http_forward.select_pool - server pool UUID

    Variable Persistence On Select a generic persistence profile and enter a variable name.

    You can also enable Hash Variable. If the variable value is long, hashing the variable ensures that it is correctly stored in the persistence table. If the Hash Variable is not enabled, only the fixed prefix part of the variable value is stored in the persistence table if the variable value is long. As a result, two different requests with long variable values might be dispatched to the same backend server because their variable values have the same prefix part, when they should be dispatched to different backend servers.

    Connection Drop

    If negate is enabled in condition, when Connection Drop is configured, all requests not matching the condition are dropped. Requests matching the condition are allowed.

    Reply Status Shows the status of the reply.
    Reply Message Server responds with a reply message that contains confirmed addresses and configuration.
  5. Click Save and Apply.