Stops execution of the current page and redirects to the specified URI.

 <cflocation url="page.cfm" addtoken="false" statusCode="301">

 location("mypage.cfm", "false", "301");

Attribute Reference for the cflocation tag


Required: Yes
URI or URL to redirect to.


Required: No
Default: true
Appends the CFID, CFTOKEN, JSESSIONID and possibly other session/client identifiers to the URL. Security best practices recommend setting this to false.


Required: No
Default: 302
The 30X HTTP status code. CF 8+

Examples sample code using the cflocation tag

Script Syntax

location("mypage.cfm", "false", "301");

Tag Syntax

<cflocation url="mypage.cfm" addToken="false" statusCode="301">

Fork me on GitHub