redirect

response.redirect(url)

Returns redirect response (HTTP code 307) with a specified location URL.

Parameters:

Argument

Desription

url

String with absolute URL.

Example

This examples shows how to redirect to http://google.com.

// Redirect to error page
// HTTP response code: 307
response.redirect("http://google.com");
307, redirect location: http://google.com