The Rules Engine enables you to modify the behavior of the edge, the request, and the response. See full details in the Rules Engine Guide
The Advanced Rules Engine adds Regex support as well as additional features.
- Request Header Regex
- Cookie Parameter Regex
- URL Path Regex
- URL Query Regex
Features:
- Age Response Header
- Bandwidth Throttling
- Cacheable HTTP Methods - POST
- Cacheable Request Body Size
- Cache-Key Rewrite
- Follow Redirects
- H.264 Support (HTTP Progressive Download)
- Maximum Keep-Alive Requests
- Prevalidate Cached Content
- Stale Content Delivery on Error
- Stale While Revalidate
- URL Redirect
- URL Rewrite
HTTP and WURFL variables:
HTTP variables can be used in the following features:
- Cache-Key Rewrite
- Modify Client Request Header
- Modify Client Response Header
- URL Redirect
- URL Rewrite
For example, you can pass a new header your application containing %{geo_country} and it will pass the country name, like "FR".
WURFL variables can be used in the following features:
- Modify Client Request Header
- Modify Client Response Header
For example, you can use pass a new header to your application containing %{wurfl_cap_brand_name} and it will pass the brand name, like "samsung".
WURFL requires the additional Device Detection addon to be activated on your account.
Delimiter Quick Reference
A delimiter can be specified after an HTTP variable to achieve any of the following effects:
-
Transform the value associated with the variable.
- Example: Convert the entire value to lower-case.
- Delete the value associated with the variable.
-
Manipulate the value associated with the variable.
- Example: Use regular expressions to change the value associated with the HTTP variable.
A brief description for each delimiter is provided below.
Delimiter | Description |
---|---|
:= |
Indicates that a default value will be assigned to the variable when it is either:
|
:+ |
Indicates that a default value will be assigned to the variable when a value has been assigned to it. |
: |
Indicates that a substring of the value assigned to the variable will be expanded. |
# |
Indicates that the pattern specified after this delimiter should be deleted when it is found at the beginning of the value associated with the variable. |
% |
Indicates that the pattern specified after this delimiter should be deleted when it is found at the end of the value associated with the variable. The above definition is only applicable when the % symbol is used as a delimiter. |
/ |
Delimits an HTTP variable or a pattern. |
// |
Find and replace all instances of the specified pattern. |
/= |
Find, copy, and rewrite all occurrences of the specified pattern. |
, |
Convert the value associated with the HTTP variable to lower-case. |
^ |
Convert the value associated with the HTTP variable to upper-case. |
,, |
Convert all instances of the specified character in the value associated with the HTTP variable to lower-case. |
^^ |
Convert all instances of the specified character in the value associated with the HTTP variable to upper-case. |
Variables List
Name | Variable |
ASN (Requester) | %{geo_asnum} |
City (Requester) | %{geo_city} |
Continent (Requester) | %{geo_continent} |
Cookie Value | %{cookie_Cookie} |
Country (Requester) | %{geo_country} |
Designated Market Area (Requester) | %{geo_dma_code} |
HTTP Request Method | %{request_method} |
HTTP Status Code | %{status} |
IP Address (Requester) | %{virt_dst_addr} |
Latitude (Requester) | %{geo_latitude} |
Longitude (Requester) | %{geo_longitude} |
Metropolitan Statistical Area (Requester) | %{geo_metro_code} |
Port (Requester) | %{virt_dst_port} |
Postal Code (Requester) | %{geo_postal_code} |
Query String Found | %{is_args} |
Query String Parameter Found | %{is_amp} |
Query String Parameter Value | %{arg_Parameter} |
Query String Value | %{query_string} |
Referrer Domain | %{referring_domain} |
Region (Requester) | %{geo_region} |
Request Header Value | %{http_RequestHeader} |
Request Host | %{host} |
Request Protocol | %{request_protocol} |
Request Scheme | %{scheme} |
Request URI | %{request} |
Request URI (Relative without query string) | %{uri} |
Request URI (Relative) | %{request_uri} |
Response Header Value | %{resp_ResponseHeader} |
WURFL Variables
Capability | Variable | Description | Sample Value(s) |
---|---|---|---|
Brand Name |
%{wurfl_cap_brand_name} |
A string that indicates the brand name of the device. |
Samsung |
Device OS |
%{wurfl_cap_device_os} |
A string that indicates the operating system installed on the device. |
IOS |
Device OS Version |
%{wurfl_cap_device_os_version} |
A string that indicates the version number of the OS installed on the device. |
1.0.1 |
Dual Orientation |
%{wurfl_cap_dual_orientation} |
A Boolean that indicates whether the device supports dual orientation. |
true |
HTML Preferred DTD |
%{wurfl_cap_html_preferred_dtd} |
A string that indicates the mobile device's preferred document type definition (DTD) for HTML content. Three sample values are provided on the right. |
none xhtml_basic html5 |
Image Inlining |
%{wurfl_cap_image_inlining} |
A Boolean that indicates whether the device supports Base64 encoded images. |
false |
Is Android |
%{wurfl_vcap_is_android} |
A Boolean that indicates whether the device uses the Android OS. |
true |
Is IOS |
%{wurfl_vcap_is_ios} |
A Boolean that indicates whether the device uses iOS. |
false |
Is Smart TV |
%{wurfl_cap_is_smarttv} |
A Boolean that indicates whether the device is a smart TV. |
false |
Is Smartphone |
%{wurfl_vcap_is_smartphone} |
A Boolean that indicates whether the device is a smartphone. |
true |
Is Tablet |
%{wurfl_cap_is_tablet} |
A Boolean that indicates whether the device is a tablet. This is an OS-independent description. |
true |
Is Wireless Device |
%{wurfl_cap_is_wireless_device} |
A Boolean that indicates whether the device is considered a wireless device. |
true |
Marketing Name |
%{wurfl_cap_marketing_name} |
A string that indicates the device's marketing name. |
BlackBerry 8100 Pearl |
Mobile Browser |
%{wurfl_cap_mobile_browser} |
A string that indicates the browser used to request content from the device. |
Chrome |
Mobile Browser Version |
%{wurfl_cap_mobile_browser_version} |
A string that indicates the version of the browser used to request content from the device. |
31 |
Model Name |
%{wurfl_cap_model_name} |
A string that indicates the device's model name. |
s3 |
Progressive Download |
%{wurfl_cap_progressive_download} |
A Boolean that indicates whether the device supports the playback of audio/video while it is still being downloaded. |
true |
%{wurfl_cap_release_date} |
A string that indicates the year and month on which the device was added to the WURFL database. Format: yyyy_mm |
2013_december |
|
Resolution Height |
%{wurfl_cap_resolution_height} |
An integer that indicates the device's height in pixels. |
768 |
Resolution Width |
%{wurfl_cap_resolution_width} |
An integer that indicates the device's width in pixels. |
1024 |
Comments
0 comments
Please sign in to leave a comment.