Your host is wrong on both counts. However you can setup a global missing
page error template in the cfadmin.

You set this link up in the "Settings" section under the cfadmin. The value
you type for this field is the relative path to your wwwroot directory.
Below is the code that I use for my 404 error template globally for all
sites on my server. It will however only pick up 404 pages that have a
request of .cfm.

<cfset AdminEmail=''>
<cfset AdminEmailCC=''>
<cfsavecontent variable="myErrorPage">
 <font face="verdana" size="2">Page could not be found</font>
 <br/>
 <br/>
 <cfdump var="#cgi#">
 <br/>
</cfsavecontent>
<cfmail to="#Variables.AdminEmail#" from="#Variables.AdminEmail#"
cc="#Variables.AdminEmailCC#" subject="Missing Page on Banshee3"
type="html">#Variables.myErrorPage#</cfmail>
<html>
 <head>
  <title>Page could not be found.</title>
  <meta http-equiv="Content-Type" content="text/html;
charset=request.charset">
  <cfoutput>
   <meta http-equiv="Refresh" content="10; URL=http://#Http_Host#";>
  </cfoutput>
  <style type="text/css">
   .title {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #003A79;
   }
   .text {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    line-height: 1.5em;
   }
   a {
    color: #093765;
    text-decoration: underline;
   }
   a:hover {
    color: #4690E9;
   }
  </style>
 </head>
 <body>
  <table width="100%" height="100%" cellpadding="0" cellspacing="0"
border="0">
   <tr>
    <td align="center" valign="middle">
     <table width="500" border="0" cellspacing="1" cellpadding="3">
      <tr>
       <td width="46">&nbsp;</td>
       <td width="439" class="title">Page could not be found.</td>
      </tr>
      <cfoutput>
       <tr>
        <td>&nbsp;</td>
        <td class="text" style="border-top: 1px solid ##999999">
         <p>The page you were attempting to reach could not be found.</p>
            <p>You will automatically be redirected to this sites home page
please update your bookmarks.</p>
         <p><strong><a href="http://#Http_Host#";>Click here to return to the
home page</a></strong></p>
        </td>
       </tr>
       <tr>
        <td>&nbsp;</td>
        <td class="text" style="border-top: 1px solid ##999999">
         <p>The administrator has been notified of this issue. If the
problem persists, please <a href="mailto:#Variables.AdminEmail#";>write to
him</a>. Thank you.</p>
        </td>
       </tr>
      </cfoutput>
     </table>
    </td>
   </tr>
  </table>
 </body>
</html>


----- Original Message ----- 
From: "Benjamin Rosenthal" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, August 29, 2003 6:39 PM
Subject: setting default page for 404 error


> I'm using a shared host and I used their own in-house utility to set up a
> default page for 404 (file not found) errors in IIS.
>
> This seems to be working for non .cfm files.
>
> Examples that work fine:
>
> http://domain.com/badname.htm
> http://domain.com/badname.asp
> http://domain.com/anything
>
> However, for cfm files:
>
> http://domain.com/badname.cfm
>
> A file not found error is generated by Coldfusion itself.  On my previous
> host this was all set up by one default on IIS.
>
> My new host is telling me to use cferror in the application.cfm file and
it
> has nothing to do with the server settings.  Is this true?  Is it possible
> for <cferror> to recognize a file not found error?  Every tag
> I've tried so far has ignored missing file errors.
>
> Benjamin
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to