Lucee Function Reference
location()
Stops execution of the current request and redirect to another location.
Example
location(string url,[boolean addToken,[numeric statusCode,[boolean encode]]]):void
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | URL where the call should redirect |
| addToken | boolean | No | appends client variable information to URL (true|false) |
| statusCode | numeric | No | The HTTP status code (301,302(default), 303, 304, 305, 307) |
| encode | boolean | No | Encode the given URL value |