### Method

# Soup ServerMessage set_redirect

#### Declaration [src]

    void
    soup_server_message_set_redirect (
      SoupServerMessage* msg,
      guint status_code,
      const char* redirect_uri
    )

#### Description [src]

Sets `msg`‘s status_code to `status_code` and adds a Location header pointing to `redirect_uri`. Use this from a `SoupServer` when you want to redirect the client to another URI.

`redirect_uri` can be a relative URI, in which case it is interpreted relative to `msg`‘s current URI. In particular, if `redirect_uri` is just a path, it will replace the path and query of `msg`‘s URI.

#### Parameters

`status_code`

  Type: `guint`

  A 3xx status code.

`redirect_uri`

  Type: `const char*`

  The URI to redirect `msg` to.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.