Redirect the visitor

  • Set the response file's location string attribute to the desired path,

  • optionally set the response file's statusCode to 3xx (optional).

sjs-4 example

response.attrStr('location', '/');
response.statusCode(301);
Subscribe to our newsletter!