Previous Topic: Proxy Rules Example—Routing Requests with URIs

Next Topic: Proxy Rules Example—Routing Requests with Nested Conditions

Proxy Rules Example—Routing Requests by File Extension

The example file proxyrules_example5.xml file routes SPS requests based on the file extension requested by the user. This is achieved by using the URI condition in combination with the endswith criteria.

In the file, the <nete:forward> and </nete:forward> tags appear on separate lines due to space constraints. However, in your proxy rules configuration files, the opening and closing tags for a <nete:forward> element must appear on the same line. If they do not, the SPS interprets the line break as part of the forward URL, which causes requests to be forwarded incorrectly.

In the previous example, users who access .jsp resources are forwarded to an application server, while wireless users are forwarded to the wireless server. All other users are forwarded to the home server.

The following table illustrates the results of requests using the proxy rules based on file extensions.

Requested URL

Forwarded URL

http://www.company.com/app.jsp

http://application.company.com/app.jsp

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

http://wireless.company.com/index.wml

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

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