Skip to main content

Filters

Filters are the conditions you add to a redirect rule to control when it applies. A redirect rule matches a request only when all of its filters are satisfied — see Priority for how AlterURL picks a winner when more than one rule matches.

Each filter is made up of three parts:

Available Operators

The operators available for a filter depend on the attribute's type:

Text attributes (e.g. Device Type, OS, custom text attributes)

OperatorDescription
EqualsMatches when the attribute value is exactly the given text.
Not equalsMatches when the attribute value is not the given text.
Start withMatches when the attribute value starts with the given text.

Date attributes (e.g. Date)

OperatorDescription
isMatches on the exact date.
Is beforeMatches when the current date is before the given date.
Is afterMatches when the current date is after the given date.
Is betweenMatches when the current date falls within the given date range.

Option attributes (e.g. Country, or a custom attribute with predefined values)

OperatorDescription
EqualsMatches when the attribute value is exactly the given option.
Not equalsMatches when the attribute value is not the given option.
Is one ofMatches when the attribute value is one of several given options.
Not one ofMatches when the attribute value is none of the given options.

Example

Suppose you want to redirect mobile users from India to a region-specific landing page:

  • Filter 1 — Attribute: Device Type, Operator: Equals, Value: mobile
  • Filter 2 — Attribute: Country, Operator: Equals, Value: IN

A request only matches this rule when both filters are true — a desktop user from India, or a mobile user from another country, will not match.

Combining with Other Rules

The number of filters on a rule also determines how specific it is: when a request matches more than one rule, AlterURL prefers the rule with the most filters satisfied before falling back to Priority to break ties. Adding more specific filters to a rule is the most reliable way to make sure it's chosen over a more general one.