Nope, read that wrong. On Feb 2, 2014 12:39 PM, timothy.he...@gmail.com wrote:
> Looks like newurl isn't a url, rather a path, it's appended to the domain > name. > On Feb 2, 2014 12:35 PM, "Cameron Childress" <camer...@gmail.com> wrote: > >> >> fileExists() accepts a filename on the filesystem, not a URL. >> >> -Cameron >> >> >> On Sun, Feb 2, 2014 at 11:41 AM, Rob Voyle <robvo...@voyle.com> wrote: >> >> > >> > Hi Folks >> > >> > I have a basic ".html" site that I have converted to a coldfusion site. >> > >> > since there are many old .html links out there I added the following to >> my >> > notFound.cfm file: >> > >> > <cfif notFoundUrl contains ".html" > >> > <cfset newUrl="http://www.mydomain.com" & >> > replace(notFoundUrl,".html",".cfm")> >> > <cfif fileExists(newUrl) is "yes"> >> > <cflocation url="#newUrl#"> >> > <cfelse> >> > <cflocation url="http://www.mydomain.com"> >> > </cfif> >> > </cfif> >> > >> > Works fine if the file exists but throws an error if the file doesn't >> > exist rather than >> > redirecting. >> > >> > Also which log file would have the error in it as I can't find the error >> > in any of the >> > logs >> > >> > What am I missing? >> > >> > Thanks >> > Rob >> > >> > >> > >> > >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357574 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm