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:
- Attribute — what to check. This can be a System Attribute, a Destination URL Attribute, or a custom attribute.
- Operator — how to compare the attribute's value.
- Value — what to compare it against.
Available Operators
The operators available for a filter depend on the attribute's type:
Text attributes (e.g. Device Type, OS, custom text attributes)
| Operator | Description |
|---|---|
| Equals | Matches when the attribute value is exactly the given text. |
| Not equals | Matches when the attribute value is not the given text. |
| Start with | Matches when the attribute value starts with the given text. |
Date attributes (e.g. Date)
| Operator | Description |
|---|---|
| is | Matches on the exact date. |
| Is before | Matches when the current date is before the given date. |
| Is after | Matches when the current date is after the given date. |
| Is between | Matches when the current date falls within the given date range. |
Option attributes (e.g. Country, or a custom attribute with predefined values)
| Operator | Description |
|---|---|
| Equals | Matches when the attribute value is exactly the given option. |
| Not equals | Matches when the attribute value is not the given option. |
| Is one of | Matches when the attribute value is one of several given options. |
| Not one of | Matches 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.