0

I want to create a custom search engine(SE) friendly 404 page to handle 404 (Not found) and 404-like content. In theory everything should be done in application.cfc page with a few lines of code.

Here is what I have in mind. CF code needs to recognize the 404s, redirect to SE friendly 404-page.cfm (for example) and then to redirect to the index.cfm!? Also it would be great if the code could recognize both http://www.whatever.com/abc.html and http://www.whatever.com/abc/ as 404s.

The question is, should I use onMissingTemplate()?
Please give me some example or at least tell me where to start.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Spiderant
0

In the Coldfusion Administrator under SERVER SETTINGS >> SETTINGS >> MISSING TEMPLATE HANDLER you can "Specify the relative path to the template to execute when ColdFusion cannot find a requested template." This is the best way to handle 404 errors.

I want to create a custom search engine(SE) friendly 404 page to handle 404 (Not found) and 404-like content. In theory everything should be done in application.cfc page with a few lines of code.

Here is what I have in mind. CF code needs to recognize the 404s, redirect to SE friendly 404-page.cfm (for example) and then to redirect to the index.cfm!? Also it would be great if the code could recognize both http://www.whatever.com/abc.html and http://www.whatever.com/abc/ as 404s.

The question is, should I use onMissingTemplate()?
Please give me some example or at least tell me where to start.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.