Library Table of Contents Index Previous Next Comments

Specifying the filer response to HTTP requests

Adding the map rule

What the map rule specifies  Top

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.

Adding the map rule  Top

To add a map rule in the /etc/httpd.translations file, complete the following steps.

Step

Action

1

Open the /etc/httpd.translations file using a text editor.

2

Enter the following command:

map template result

template is a component of a URL, for example,
/image-bin/graphics/

result is the directory to which the request is mapped.

3

Save the file.

About wildcard characters in the template field  Top

You can use the wildcard character asterisks (*) in the template field. If the wildcard character matches zero or more characters, including the slash (/) character.

About wildcard characters in the result field  Top

If you use asterisks as wildcard character 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.

Using multiple wildcard characters  Top

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.

Example of a map rule entry  Top

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/* 

Library Table of Contents Index Previous Next Comments