Chapter 6: Definition Reference
define url_rewrite
Defines rules for rewriting URLs embedded in tags within HTML, CSS, JavaScript or ASX documents. This transformer takes effect only if it is also invoked by a transform action in a define action definition block, and that block is in turn called from an action( ) property.
For each url found within an HTTP response, a url_rewrite transformer first converts the URL into absolute form, then finds the first subst_embedded or subst_prefix statement whose server_URL_substring matches the URL being considered. If such a match is found, then that substring is replaced by the client_url_substring.
Matching is
Multiple URL prefix substitutions can be made in a single define url_rewrite definition block. This type of transformation is often used in conjunction with the request URL form of the rewrite( ) action in a server portal application.
To find URLs within an HTTP response, the ProxySG looks for Location:,
Refresh: headers, and parses HTML, JavaScript, CSS, and ASX files. The ProxySG does not search for, nor rewrite relative URLs embedded within Javascript.
Note: Pages served over an HTTPS tunneled connection are encrypted, so URLs embedded within them cannot be rewritten.
Transformed content is not cached (although the original object may be), in contrast with content that has been sent to a virus scanning server. This means any transformer can be safely triggered based on any condition, including client identity and time of day.
Replaces: transform url_rewrite
Syntax
define url_rewrite transformer_id [caseless]
subst_embedded "client_url_substring" "server_url_substring" subst_prefix "client_url_substring" "server_url_substring"
...
end
where:
•
•
•
•
265