How do you redirect ColdFusion and manage the status code (i.e. 301 instead of 302)

This code does the redirect, but uses the status code 302:

<cflocation url="http://stackoverflow.com" addToken="no" /> 

I found this on the Internet, but I think it only works in ColdFusion8. I am using ColdFusion7.

 <cflocation url="http://stackoverflow.com" addToken="no" statuscode="301" /> 

Can you manage the status code in ColdFusion7?

+7
redirect coldfusion
source share
1 answer

<cfheader statuscode="301" statustext="Moved permanently"> <cfheader name="Location" value="http://stackoverflow.com">

+8
source share

All Articles