<!--- Kill extra output. ---> <cfsilent> <!--- Param the image ID that will be coming in. ---> <cfparam name="URL.id" type="string" default="" /> <!--- Check the ID to see if this is a valid photo ID request. If it is, we are going to set the target URL so that we only need ONE CFLocation tag. ---> <cfswitch expression="#URL.id#"> <cfcase value="1"> <cfset strURL = "thick_chick_still_a_hottie.jpg" /> </cfcase> <cfdefaultcase> <cfset strURL = "image_not_found.gif" /> </cfdefaultcase> </cfswitch> <!--- ASSERT: At this point, even if we were given an invalid image ID, we are going to have a target URL thanks to the CFDefaultCase tag. ---> <!--- Forward image request to actual image file. ---> <cflocation url="#strURL#" addtoken="false" /> </cfsilent>