ProxySG Content Policy Language Guide
•
Note: Both client_url_substring and server_url_substring are literal strings. Wildcard characters and regular expression patterns are not supported.
Discussion
If there are a series of subst_embedded and subst_prefix statements in a url_rewrite definition, the first statement to match a URL takes effect and terminates processing for that URL.
Layer and Transaction Notes
Applies to proxy transactions.
Example
<Proxy> ; server portal for IJK url=ijk.com/ action.ijk_server_portal(yes)
; This transformation provides server portaling for IJK non video content
define url_rewrite ijk_portal caseless
subst_embedded "http://www.ijk.com/" "http://www.server1.ijk.com/" end
;This action runs the transform for IJK server portaling for http content
;Note that the action is responsible for rewriting related headers
define action ijk_server_portal ; request rewriting
rewrite( url, "^http://www\.ijk\.com/(.*)", "http://www.server1.ijk.com/`(1)" ) rewrite( request.header.Referer, "^http://www\.ijk\.com/(.*)",
"http://www.server1.ijk.com/`(1)" )
;response rewriting transform ijk_portal
rewrite( response.header.Location, "^http://www\.server1\.ijk\.com/(.*)",
"http://www.ijk.com/`(1)" )
end
See Also
•Actions: transform
•Definitions: define action, define active_content
•Properties: action( )
266