Why i have to be doing this i dont know, but here it goes. for started, CFFILE and CFHTTP, from my experience continually over rides the var on each request, so you have to copy the response from each request into a sep variable.
this is very quick and dirty, but just the same explains what i mean ////////////////////////////////////////////////////////////////// <cfset URLStr = "http://www.ikea.com.au"> <cftry> <cfhttp url="#URLStr#" redirect="no" throwonerror="Yes"></cfhttp> <cfset cfhttpResult_1 = duplicate(CFHTTP)> <cfif cfhttpResult_1.responseHeader.status_code EQ 200> Start URL is valid<br> </cfif> <cfcatch> <cfhttp url="#URLStr#" redirect="no" throwonerror="No"></cfhttp> <cfset cfhttpResult_2 = duplicate(CFHTTP)> <!--- lets guess its a file not found ---> <cfif LEFT(cfhttpResult_2.responseHeader.status_code, 1) EQ 4> File not found </cfif> <!--- Lets guess a redirect ---> <cfif LEFT(cfhttpResult_2.responseHeader.status_code, 1) EQ 3> Start URL is being redirected<br> <cftry> <cfhttp url="#URLStr#" redirect="Yes" throwonerror="Yes"></cfhttp> <cfset cfhttpResult_3 = duplicate(CFHTTP)> <cfif cfhttpResult_3.responseHeader.status_code EQ 200> End URL after redirect is valid<br> </cfif> <cfcatch> Redirect URL un available<br> </cfcatch> </cftry> </cfif> </cfcatch> </cftry> /////////////////////////////////////////////////////// Steve --- 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/
