redirect

response.redirect(url)

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

Parameters:

ArgumentDesription
urlString 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