
213
Appendix D
Configuration Files
Example
The following section shows example mapping rules in the
remap.config
file.
Reverse proxy mapping rules
The following example shows a map rule that does not specify a path prefix in the target or replacement:
map http://www.x.com/ http://server.hoster.com
This rule results in the following translations:
The following example shows a map rule with path prefixes specified in the target:
map http://intranet.y.com/marketing http://marketing.y.com/
map http://intranet.y.com/sales http://sales.y.com
map http://intranet.y.com/engineering http://engineering.y.com/
map http://intranet.y.com/ http://info.y.com/
These rules result in the following translations:
The following example shows that the order of the rules matters:
map http://www.g.com/ http://external.g.com/
map http://www.g.com/stuff http://stuff.g.com
The above rules result in the following translation:
In the above examples, the second rule is never applied because all URLs that match the second rule also match
the first rule. The first rule takes precedence because it appears earlier in the
remap.config
file.
The following example shows a mapping with a path prefix specified in the target and replacement:
map http://www.h.com/a/b http://server.h.com/customers/x/y
This rule results in the following translation:
Client Request
Translated Request
http://www.x.com/Widgets/index.html
http://server.hoster.com/Widgets/index.html
http://www.x.com/cgi/form/submit.sh?arg=true
http://server.hoster.com/cgi/form/submit.sh?arg=true
Client Request
Translated Request
http://www.y.com/marketing/projects/manhattan/
specs.html
http://marketing.y.com/projects/manhattan/
specs.html
http://www.y.com/stuff/marketing/projects/boston/
specs.html
http://info.y.com/marketing/projects/boston/
specs.html
http://www.y.com/engineering/marketing/
requirements.html
http://engineering.y.com/marketing/
requirements.html
Client Request
Translated Request
http://www.g.com/stuff/a.gif
http://external.g.com/stuff/a.gifl
Client Request
Translated Request
http://www.h.com/a/b/c/d/doc.html
http://server.h.com/customers/x/y/c/d/doc.html
http://www.h.com/a/index.html
Translation fails