How do I make a 301 redirect (permanently) from url1 to url2?
Permanently redirecting traffic using <cfheader> with statuscode="301" is the best way to ensure that your web-visitors and search engine spiders continue to find content that has permanently moved to a new location.
<cfheader name="Location" value="http://www.newUrl.com">
This question was written by Jeremy Petersen.
It was last updated on June 19, 2006 at 12:59:09 PM EDT.
CFML Referenced
Categories
Comments
Comment made by dickbob on June 21, 2006 at 3:39 AM
Should you use this to redirect calls to http://mydomain.com/ on to http://www.mydomain.com/
Comment made by Jeremy Petersen on June 21, 2006 at 11:24 AM
That should work. With a 301 redirect you are basically saying this old address is gone and now lives at the new address.