Stops execution of the current page and redirects to the given URL.
location(url [, addtoken] [, statuscode])
→ returns void
true
302
300
301
302
303
304
305
306
307
addtoken
default value is false
when Secure Profile is enabled
Relocates to a different page if user is not logged in.
if (!structKeyExists(session, "userID") {
location("login.cfm");
}
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.