$Revision: 1.2 $
$Date: 2005/08/24 13:24:33 $

# Functions

## `prefix2domain(mode)`

Build a new URI if it is necessary. Returns 1 when the translation was made or there was nothing to translate (user part of the URI is empty, it does not match the prefix parameter or there is no domain associated with a possible prefix from user part). Returns -1 in error cases.

The "mode" parameter specifies whether to strip or not the prefix from user part. If the parameter is missing or it has the value "0", then the prefix is removed along with the leading prefix. If the value is "1", only the leading prefix is removed. If the values is "2" the user part of the URI is not changed.

### `prefix2domain` usage

    ...
    prefix2domain();
    ...
    prefix2domain("2");
    ...