The example file proxyrules_example6.xml file routes SPS requests based on the hostname, certain headers, and device types. This file demonstrates how the SPS can handle complex relationships in a single configuration file.
In the file, the <nete:forward>URL</nete:forward> elements must be located on the same line. In the example, the </nete:forward> closing tags sometimes appear on a separate line due to space constraints, however, a line break in an actual proxy rules file causes an error. The SPS interprets line breaks before the </nete:forward> closing tag as characters that are part of the URL contained in the nete:forward element.
The following table illustrates the results of requests using proxy rules with nested conditions.
Requested URL |
Forwarded URL |
---|---|
http://banking.company.com/index.wml |
http://wireless.company.com/banking/index.wml |
http://banking.company.com/index.html |
http://server1.company.com/banking/index.html |
http://bondtrading.company.com/index.html with a header value of GOLD_USER="yes" |
http://fast.company.com/bondtrading/index.html |
http://bondtrading.company.com/index.html with a header value of GOLD_USER="no" |
http://server2.company.com/bondtrading/index.html |
http://www.company.com/index.wml with a USER_AGENT header value that contains a wireless device name |
http://home.company.com/ |
http://www.company.com/index.html with a USER_AGENT header value that does not contains a wireless device name |
http://home.company.com/index.html |
Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |