cf301Redirect(urlString)
Last updated December 6, 2008
Version: 0 | Requires: ColdFusion MX | Library: UtilityLib
Description:
Takes a url and 301 redirects to user to that url. Please note - ColdFusion 8 adds the statusCode attribute to be cflocation. This UDF should only be used in ColdFusion 6 and 7.
Return Values:
Returns nothing.
Example:
Parameters:
| Name | Description | Required |
|---|---|---|
| urlString | URL to push the user to. | Yes |
Full UDF Source:
<!---
Takes a url and 301 redirects to user to that url.
@param urlString URL to push the user to. (Required)
@return Returns nothing.
@author Erik Vold (erikvvold@gmail.com)
@version 0, December 6, 2008
--->
<cffunction name="cf301Redirect" access="public" returntype="void" output="false">
<cfargument name="urlString" type="string" required="yes" />
<!--- 301 redirect the user to the provided url --->
<cfheader statuscode="301" statustext="Moved permanently" />
<cfheader name="Location" value="#arguments.urlString#" />
</cffunction>
Search CFLib.org
Latest Additions
Tayo Akinmade added
arrayTrim
11 day(s) ago
Will Belden added
longTime
17 day(s) ago
James Sleeman added
quickSort
27 day(s) ago
Ben Forta added
GetHostAddress
29 day(s) ago
Top Rated
EksporSQLData
Rated 5.0, 16 time(s)
backupDatabase
Rated 5.0, 13 time(s)
indentXml
Rated 5.0, 10 time(s)
generateSsccAsn
Rated 5.0, 4 time(s)