Search.../

redirectUrl

Sets or gets the url to redirect to when responding with status codes 301 and 302.

Type:

stringRead & Write

Was this helpful?

Get the URL to redirect to

Copy Code
1export function myRouter_Router(request) {
2
3 let redirectUrl = response.redirectUrl;
4 // "http://someothersite.com"
5
6}
Set the URL to redirect to

Copy Code
1export function myRouter_Router(request) {
2
3 response.redirectUrl = "http://someothersite.com";
4
5}