This seems to work fine for me:
<cffunction name="checkURL">
<cfargument name="myURL" type="string" required="true" />
<cfhttp url="#myUrl#" redirect="false" />
<cfset var sc = left(cfhttp.ResponseHeader.status_code,1)>
<cfif sc eq 3>
<cfif cfhttp.ResponseHeader.location EQ myURL>
<cfthrow type="checkurl.error" message="Infinite
redirect"/>
</cfif>
<cfset checkURL(cfhttp.responseheader.location) />
<cfelseif sc EQ 5>
<cfthrow type="checkurl.error" message="Internal server error">
<cfelseif sc EQ 4 >
<cfthrow type="checkurl.error" message="Not found">
</cfif>
</cffunction>
<cftry>
<cfset checkURL("http://www.ikea.com.au/") />
<cfoutput>That URL is Fine</cfoutput>
<cfcatch>
<cfoutput>That URL has something wrong with it:
#cfcatch.message#</cfoutput>
</cfcatch>
</cftry>
<disclaimer>
Bearing in mind that I have publicly said in the past that I had given
up on giving you any help on mailing lists.
This is help that is being given for free. If it doesn't work try to
be understanding of why it doesn't work and why the person trying give
you the help didn't quite understand exactly what you were asking for.
It never hurts to thank them if it does work and it definitely helps
if you try to meet them half way by putting as much effort into
helping them help you as they are putting in.
</disclaimer>
Spike
--
--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk
Do you cfeclipse? http://cfeclipse.tigris.org
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/