Use of MapQuery directive
 Technote (FAQ)
 
Problem
When the Caching Proxy performs rule mapping, it simplifies the incoming requests without using the string after a '?'.
 
Cause
The Caching Proxy could not handle URL with query string before new directive was added.
 
Solution
Before the MapQuery directive was added, when the Proxy performed rule mapping, it always simplified the incoming request to a request path (without the string after ? mark). The Proxy also used the request path to match the mapping rules defined in the ibmproxy.conf.

In order to handle a URL with a query string, the MapQuery directive was provided. The functionality of the directive is almost the same as the Map rule, except it uses the whole incoming request (including the path and query string) URL to match the rule. If the incoming URL is matched on a MapQuery rule, the translated URL will be used to match against the rest of the rules. The following is an example:

Assuming the incoming URL is the following,

/getsomthing?type=1

and rules are the following,


MapQuery  /getsomething?type=*  /gettype/*

Note: The translated URL will be /gettype/1, and it will be used in the next rule mapping.

Proxy  /gettype/*  http://server/gettype/*

Note: The translated URL will be http://server/gettype/1.

MapQuery could also translate a URL with a query string to another URL with a different path or different query string. However, because all other mapping directives only use request path, the changed query string will only be appended (will not be used to match patterns) to the translated URL when the request path is matched.
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers WebSphere Application Server Edge Component AIX, HPUX, Linux, Solaris, Windows 6.0 Base, Express, Network Deployment
   
 


Document Information


Product categories: Software > Application Servers > Edge Servers > WebSphere Edge Server > Caching Proxy
Operating system(s): Windows
Software version: 6.0
Software edition:
Reference #: 1210794
IBM Group: Software Group
Modified date: Jun 30, 2005