The map rule specifies that if a component of a URL matches the template, the request is mapped to another directory on the same host, as defined in the result field.
To add a map rule in the /etc/httpd.translations file, complete the following steps.
| 1 | |
| 2 |
map template result
template is the component of a URL that you want mapped, for example: |
| 3 |
You can use an asterisk (*) as a wildcard character in the template field. The wildcard character matches zero or more characters, including the slash (/) character.
If you use asterisks as wildcard characters in the result field, the wildcard character represents the text expanded from the match in the template field. You should include the wildcard character in the result field only if you use a wildcard in the template field.
If you use multiple wildcard characters, the first one in the result field corresponds to the first one in the template field, the second one in the result field corresponds to the second one in the template field, and so on.
The following map rule entry in the /etc/httpd.translations file causes any requests to a URL containing the /image-bin directory to be mapped to the /usr/local/http/images directory:
map /image-bin/* /usr/local/http/images/*
Copyright © 1994-2003, Network Appliance, Inc. All rights
reserved.
Part No. 210-00473
File: http5.htm
Last updated: 11/25/03 18:02:58