It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda Load Balancer

Understanding Redirect Rules

  • Last updated on

Use the WEBSITES > Redirect Rules page to define rules to redirect client requests to a specific URL or to a domain appending the requested URL for a selected Service:


A redirect rule consists of three patterns: host matchURL match, and extended match
If there are multiple rules for a Service, the most specific host and URL match is executed. For example, if a Service has these two rules:

  • Rule A - host, URL /images/*
  • Rule B - host, URL /images/*.png

and if the incoming request is for, then the most specific matching rule, which is Rule B, is executed.  If a rule has the most specific host and URL for a request, any Extended Match expressions for that rule are evaluated in the order established by the Extended Match Order field. If the request does not match any Extended Match expression for the rule then the request is considered to have failed to match any rule.

You can include %s in the URL to redirect to the domain (URL) specified appending the same requested URL. For example,

  • Service:
  • URL Match: /*
  • Redirect URL:

When a request such as is sent, it is redirected to

You can also use % in the URL to offset characters. For example,

  • Service:
  • URL Match: /*
  • Redirect URL:*

If you use %s, the redirected URL would be instead of*.

In this case, specify the Redirect URL as This format will copy anything in the URL match after 4 characters.

Rule Key

Each redirect rule can be specified using a Rule key. The key is comprised of the URL, host and an optional extended match rule (that is, a value or expression for the header parameter). The matching Rule is determined by a best match algorithm using the host, URL and extended match fields in specified sequential order. In most cases, host and URL may only be used to specify a Rule. The Barracuda Load Balancer optimizes the search for the most common case by implementing a parallel search algorithm on all Rules. The best matching Rule is the Rule with closest matching host and URL keys. To configure a more complex Rule based on certain fields in the request such as a client IP or an HTTP header, use extended match rules. Not all extended match rules are considered for evaluation. Only the ones specified for the matching host and URL are used for evaluation. If more than one such rule is specified, they are evaluated based on the specified extended match sequence, and the lower the extended match sequence the higher the priority of the rule in the sequence.

For more information on building a redirect rule, log into the Barracuda Load Balancer web interface, go to the WEBSITES > Redirect Rules page, and click the Help button.

For details on Extended Match and Condition expressions, HTTP request rewrite rules, and HTTP response rewrite rules, refer to the article How to Use Extended Match and Condition Expressions.

For details on adding Content Rules to a Service, refer to the article Understanding Content Rules.

Last updated on