The redirect() static method of the Response interface returns a Response resulting in a redirect to the specified URL.
redirect()
Response
MDN Reference