Rewrites or redirects the path of incoming requests based on a mapping.
<rewriter>
<map from="..." to="..." do="..." >*
</rewriter>
The first mapping in the example below shows a simple mapping from the path /home to /index.
In the second mapping a regexp group captures everything after /bank/. The $1 in the rewritten URI will be substituted with the content of the captured group.
In the third mapping, a group captures everything after /search/ and redirects the user to some example search portal searching for the content of the group.
<serviceProxy port="80">
<rewriter>
<map from="^/home" to="/index" />
<map from="^/bank/(.*)" to="/axis2/$1" />
<map from="^/search/(.*)" to="http://www.example.com/search?q=$1" do="redirect" />
</rewriter>
</serviceProxy>
Elements | Description | Cardinality |
---|---|---|
map | Defines a regex and a replacement for the rewriting of the URI. | 0..* |