Previous Topic: Proxy Rules Example—Routing Requests by Virtual Host

Next Topic: Proxy Rules Example—Routing Requests by Device Type

Proxy Rules Example—Routing Requests by Header Value

The example file proxyrules_example2.xml file routes SPS requests based on the value of an HTTP header. The HTTP header can be a standard header or one created using a SiteMinder response.

Note: For information about SiteMinder responses, see the CA SiteMinder Policy Design.

In this example, assume that the SPS routes requests made to a default virtual host of www.company.com.

In this file, the value of the HTTP header variable "HEADER" determines the destination for the request.

The following table illustrates the results of requests using the proxy rules based on an HTTP header.

Requested URL

Forwarded URL

http://www.company.com/index.html

HTTP_HEADER has the following value:

HTTP_HEADER="value1"

http://server1.company.com/index.html

http://www.company.com/index.html

HTTP_HEADER has the following value:

HTTP_HEADER="value2"

http://server2.company.com/index.html

http://www.company.com/index.html

HTTP_HEADER has a value other than value1 or value2.

http://home.company.com/index.html

Note: You do not need to include the HTTP_ of the header variable name in the nete:cond element. SPS assumes HTTP_ for header variable names.

Proxy rules that use header values are an excellent way to forward requests based on a desired level of service. For example, you can use the value of an HTTP header variable that contains a user account types to distribute requests to high performance servers for customers with premium accounts.