Spec-Zone.ru › ColdFusion

cflocation

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");

  • CF
  • Lucee
  • See Also: cfforward cfheader

    Attribute Reference

    url string
    Required

    URI or URL to redirect to.

    addtoken boolean
    Default: true

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

    statuscode numeric
    Default: 302

    The 30X HTTP status code. CF 8+

    Compatibility

    Lucee:

    Lucee automatically URL encodes the url by default. See ticket LDEV-2164.

    Examples
    Sample code using the cflocation tag

    Script Syntax

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

    Tag Syntax

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

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/cflocation

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API