Chapter 5: Action Reference
redirect( )
Ends the current HTTP transaction and returns an HTTP redirect response to the client by setting the policy_redirect exception. Use this action to specify an HTTP 3xx response code, optionally set substitution variables based on the request URL, and generate the new Location
FTP over HTTP requests are redirected for Netscape Navigator clients, but not Microsoft Internet Explorer clients. To avoid this issue, do not use the redirect( ) action when the url.scheme=ftp condition is true. For example, if the http_redirect action definition contains a redirect( ) action, you can use the following rule:
url.scheme=ftp action.http_redirect(no)
Note: An error results if two redirect( ) actions conflict. The error is noted at compile time if the conflicting actions are within the same action definition block. A runtime error is recorded in the event log if the conflicting actions are defined in different blocks.
Important: It is possible to put the browser into an infinite redirection loop if the URL that the browser is being redirected to also triggers a
Syntax
redirect(response_code, regex_pattern, replacement_url)
where:
•
•
•
Layer and Transaction Notes
•Use in <Proxy> or <Cache> layers.
•Do not use in <Admin>, <Forward>, or <Exception> layers.
See Also
•Actions: rewrite(url.host, host_regex_pattern, replacement_host), rewrite(url, regex_pattern, replacement_url), set(url.port, port_number)
•Conditions: exception.id=
235