Name

http_internal_redirect — Performs internal redirect.

Synopsis

any http_internal_redirect ( in full_path varchar ,
in p_full_path varchar ,
in long_url varchar ,
in keep_lpath integer );

Description

This function performs internal redirect. Can be used in handling situations where HTTP level redirection is inadequate. For example, 303 redirection offered when implementing hashless Linked Data URIs. Instead of sending a 303 Virtuoso will redirect to the URL in "Location:" and return 200 OK. Basically, this is like curl -iL instead of curl -i, but implemented inside Virtuoso.

The function can be used directly or via URI template syntax used to construct rewrite rules for Virtuoso virtual directories / web service endpoints.

Parameters

full_path

Set new logical path to be redirected to.

p_full_path

Set physical path to be redirected to.

long_url

Reserved for internal usage.

keep_lpath

Reserved for internal usage.

Examples

Example24.162.Using http_internal_redirect()

create procedure my_redirect()
{
  declare full_path varchar;
      ...
      full_path := '/DAV/VAD/test/';
      http_internal_redirect (full_path);
      set_user_id ('demo');
      set http_charset='utf-8';
      http_header ('Content-Type: text/xml; charset=UTF-8\r\n');
      WS.WS.GET (path, pars, lines);
      return null;
    }
}