Response.redirect

Creates a 3xx redirect response and adds the Location field to the header. If not specified status code 301 Moved Permanently will be used.

  1. Response redirect(Status status, string location, string[string] headers)
  2. Response redirect(uint statusCode, string location, string[string] headers)
    struct Response
    static
    redirect
    (,
    string location
    ,
    string[string] headers = defaultHeaders
    )
  3. Response redirect(string location, string[string] headers)

Examples

Response.redirect("/index.html");
Response.redirect(302, "/view.php");
Response.redirect(StatusCodes.seeOther, "/icon.png", ["Server": "sel-net"]);

Meta