### Method

# GUPnP Context rewrite_uri

#### Declaration [src]

    char*
    gupnp_context_rewrite_uri (
      GUPnPContext* context,
      const char* uri
    )

#### Description [src]

Utility function to re-write an uri to the IPv6 link-local form which has the zone index appended to the IP address.

Available since: | 1.2.0

#### Parameters

`uri` | `const char*`
| An uri to rewrite if necessary.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.

#### Return value

Returns: | `char*`
| A re-written version of the `uri` if the context is on a link-local IPv6 address, a copy of the `uri` otherwise or `NULL` if `uri` was invalid.
| The caller of the method takes ownership of the data, and is responsible for freeing it.
| The value is a NUL terminated UTF-8 string.