Custom 404 Page - Apache/Tomcat/Lucee

I have been trying to figure out how to create a custom 404 page, and am
having no luck.

In my application.cfc, I have:

Any clues?

a cflocation to a 404-Error-Page is not a good idea: the cflocation returns
a 302-Status-Code. In other words you would return a 302-Code, instead a
404.

I would make use of cfheader, and depending on your configurations your
front-end-webserver could serve a custom-error page.2016-07-26 10:06 GMT+02:00 <@sd1>:

I have been trying to figure out how to create a custom 404 page, and am
having no luck.

In my application.cfc, I have:

Any clues?


Get 10% off of the regular price for this years CFCamp in Munich, Germany
(Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€
instead of 210€. Visit
CFCamp 2016

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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/aeee9b81-8380-421a-8d85-a1727307255e%40googlegroups.com
https://groups.google.com/d/msgid/lucee/aeee9b81-8380-421a-8d85-a1727307255e%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

following on from what andy said, you can add a status code to a cflocation;

as far as I know statuscode 404 in cflocation won’t work, that should throw
an error. cflocation is there to change location by 30x headers. This can
cause a 302/301 redirect to an error page that only shows a 404 content,
but no 404-Status-Code. That’s not good for SEO.

Better is to throw a cfheader with 404 status code followed by any content.
That can be created in many ways: include-files, functions, custom-tags,
but depends on setup of the front-end webserver. We use IIS, that is why I
really can’t recommend a way to set it up in apache.

We had problems with 404 error codes being interpreted as 200 OK Success in
the past: these page were indexed by search engines. That’s why it is
important to always check the status code with a browsers developers tool
(i.g. firebug) when delivering status codes. Sorry for not giving a better
help :/On Wednesday, July 27, 2016 at 10:01:13 AM UTC+2, Luke wrote:

following on from what andy said, you can add a status code to a
cflocation;