Whatever message this page gives is out now! Go check it out!

Location

Last update:
May 18, 2026

Description

A function equivalent of the  cflocation  tag and is used in the <cfscript> mode.

Parameters

Same as the <cflocation> tag.

Category

Function syntax

location(url, addtoken, statusCode);

For positional notations, the sequence must be followed exactly in the same manner as provided in the syntax. If you do not provide one of the parameters, use an empty string instead. This does not apply to Boolean values for which you must provide proper values even if you have to skip them.

See also

Usage

You can call this function as name=value pair or as positional argument.

Example

<cfscript>
    location(url="http://localhost:8500/administrator") 
</cfscript>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page