Missing Template Error (404)

108 views
Skip to first unread message

Scott Conklin

unread,
Jun 1, 2016, 11:13:33 AM6/1/16
to Lucee
I am closing in on having solved all the inconsistencies between cf9 to Lucee from a migration done a few months ago. 

One of the few  remaining items is the setting in the cfadmin for Missing Template (404).
The small text below the setting states the following:

Template that will be invoked in case of a missing error. This setting can be overridden by the tag CFError.

which I believe is causing the issues that I wish to solve.

Our system makes use of the CFERROR tag to trap bugs and have them emailed to an admin for review.
Unlike CF9, it would appear that missing files (mostly due to junk urls) are being caught by the CFERROR  tag rather than the 
missing template setting which causes an overabundance of inconsequential error emails that is very distracting to finding real error reports.

across 50+  clients, we get 100's of such emails a day that I wish to suppress.

I though about adding a test snippet inside of our error template that would trap "the missing file" error  and send  it to our 404 page, BUT 
I would like to distinguish those generated by bad urls from  those that could be  "real" missing errors made by developers like a missing cfinclude etc..

Can anyone think of a way to accomplish what I want which is really have these handled by the missing template file.

On that note and out of curiosity,.  How is it that googlebot  and others are  attempting to index urls by injecting the word "mobile"  or "m" into the url? 

We have never had such a mapping or folder ever in our system; we don't have a mobile compliant version of our sites 
... and we have a site index map in the webroot which clearly states the pages that we would like to have indexed. 

The amount of "faked" urls  that we get is really unbelievable and I don't understand the motivation behind it.

here are some other examples:

http://www.4semi.com/Semi.com/register.cfm  >> "semi.com" injected between the domain and the script page 

http://www.vacequip.com/ful_inf.htm >>  never had a page by this name?? 


etc..

Thanks for any help

Scott

Scott Conklin

unread,
Jun 3, 2016, 9:28:18 AM6/3/16
to Lucee
Anyone? 

Risto

unread,
Jun 3, 2016, 10:24:57 AM6/3/16
to Lucee
I don't know the answer to your question, but the one about "word "mobile"  or "m" into the url? " makes me wonder
if they are doing that now because they give higher rankings to mobile first sites.

http://www.eweek.com/mobile/google-to-give-mobile-friendly-sites-better-search-rankings.html

It's just awful what we have to deal with unnecessary traffic  from Google, bots, etc. I always start my sites with CFwheels simply because I just setup
strict routes for good pages and anything else that doesn't match goes to the garbage. I was thinking how great it would be to redirect a request
right back to the IPaddress that it came from. I don't even care if the IP address is faked, not my problem they hit me first. I'm sure other CF frameworks
can do the same.

I know I didn't answer your main question so I won't hijack your thread anymore:)

Jordan Michaels

unread,
Jun 3, 2016, 4:08:58 PM6/3/16
to lu...@googlegroups.com
> it would appear that missing files (mostly due to junk urls)
> are being caught by the CFERROR tag rather than the
> missing template setting

Have you tested this theory? Properly identifying the problem is the first step to problem solving, so if I were you, I would find out *FOR SURE* if this is what's happening.

--
Kind regards,
Jordan Michaels
Vivio Technologies

----- Original Message -----
From: "Scott Conklin" <scon...@dynaprice.net>
To: "Lucee" <lu...@googlegroups.com>
Sent: Wednesday, June 1, 2016 8:13:33 AM
Subject: [Lucee] Missing Template Error (404)

I am closing in on having solved all the inconsistencies between cf9 to
Lucee from a migration done a few months ago.

One of the few remaining items is the setting in the cfadmin for *Missing
Template (404).*
http://www.4semi.com/ <http://www.4semi.com/Semi.com/register.cfm>Semi.com
<http://www.4semi.com/Semi.com/register.cfm>/register.cfm
<http://www.4semi.com/Semi.com/register.cfm> * >> "semi.com" injected
between the domain and the script page *

http://www.mmrsurplus.com/plus.com
<http://www.mmrsurplus.com/plus.com/register.cfm?menuid=m&NewReg=1&subject=1>
/register.cfm?menuid=m&NewReg=1&subject=1
http://www.vacequip.com/ <http://www.vacequip.com/ful_inf.htm>ful_inf.htm
<http://www.vacequip.com/ful_inf.htm> >> *never had a page by this name?? *

http://www.labjupiter.com/iter.com
<http://www.labjupiter.com/iter.com/register.cfm?menuid=m&NewReg=1&subject=1>
/register.cfm?menuid=m&NewReg=1&subject=1
<http://www.labjupiter.com/iter.com/register.cfm?menuid=m&NewReg=1&subject=1>
* >> "iter.com" injected in the url*

*etc..*

Thanks for any help

Scott

--
Win a ticket to dev.objective from Lucee via Twitter, see http://bit.ly/1UbTMWj for details, good luck and see you there...
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/d415ffc2-0506-4110-8503-7c0f7fb5822b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott Conklin

unread,
Jun 3, 2016, 4:16:30 PM6/3/16
to Lucee
Yes. I am 100% sure this happening.. otherwise I would not be getting these in the emails that I show in my screenshot link. 
Those emails (with the light blue background) are generated in the error template specified in the CFERROR tag.

Bilal

unread,
Jun 6, 2016, 6:13:33 PM6/6/16
to Lucee
Scott,
I have two approaches that I would like to suggest
a) A CF based solution
A simple solution could be to just create a local db of all your cfm/cfc files. 
You can use a single page that uses cfdirectory with recurse attribute to update your database after you deploy new code. 
Now in your error template from get the called template from the cgi scope and compare whether it exists on your server. If it does not, you can redirect them to themselves or anywhere else. If it does, send the email you normally send.

b) If you use IIS on Windows, you should be able to set IIS to intercept anything that is not on your machine by changing the handler rules. Under request-restrictions, there is a mapping tab - selecting "Invoke handler only if request is mapped to file" is equivalent to "check if file exists". This will throw a standard IIS 404 error. You can change the error behavior to point to anything else; google for IIS error handling for details.

HTH,
Bilal

Scott Conklin

unread,
Jun 8, 2016, 12:27:26 PM6/8/16
to Lucee
Bilal- 

Thank you very much. option b. worked perfectly.. exactly what I was looking for.

Henry Gelstor

unread,
Aug 6, 2016, 11:24:04 AM8/6/16
to Lucee
Does anyone know of any such option for Apache?  Also want to note that I have the exact same problem with 404's only for cfm's.  Can this be fixed somehow with tomcat?  Clearly intentions of the admin design were for this to work without each of us maintaining a db of valid files and checking it every hit.  Should this be added as a bug? 
Reply all
Reply to author
Forward
0 new messages