It's no mystery, that's the correct response.  Trap the 404 error for html
files at the web server and handle the cf side through either site wide or
per application error handling.
On Feb 2, 2014 11:42 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:357562
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to