Lucee Tag Reference

<cflocation>

Opens a CFML page or HTML file. For example, you might use cflocation to specify a standard message or response that you use in several applications. Use the addToken attribute to verify client requests.

Body

This tag may have a body.

Example

<cflocation
[abort=boolean]
[addtoken=boolean]
[encode=boolean]
[statuscode=number]
url=string>
[</cflocation>]
This tag is also supported within cfscript
<cfscript>
location
[abort=boolean]
[addtoken=boolean]
[encode=boolean]
[statuscode=number]
url=string {
[...]
}
</cfscript>

Attributes

The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
Name Type Required Description
abort boolean No if set to true then the request will be aborted instead of redirected to allow developers
to troubleshoot code that contains redirects 
addtoken boolean No Yes or No. clientManagement must be enabled, see cfapplication. Yes appends client variable
information to the URL you specify in the url.
Default is false (since Lucee 6, previously was true) 
encode boolean No Encode the given URL value (changed behavior in Lucee 6.0) 
statuscode number No statusCode used for the redirect (301 or 302) 
url string Yes The URL of the HTML file or CFML page to open.