0

How do you create a 404 page for Expression Engine? Does anyone have any tips or links to documentation or articles that cover this subject? Any help will be appreciated.

1

2 Answers 2

4

You might read this article Guide to 404 Pages with ExpressionEngine

It would help you great.

2
0

That article is definitely handy, but it is not recommended that you Run PHP (security risks, can't cache templates, etc...) in your templates. So I definitely would not do that. In order to pass the appropriate HTML headers look at:

[http://devot-ee.com/add-ons/http-header][1]

You would simply add: {exp:http_header status="404"} to your 404 template.

Hope that helps as well.

NB - if you throw this error via {if no_results} - as you normally do maybe? - you get 404 headers without needing PHP or an addon... see http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#if-no-results

1
  • Please, complete the answer of Bhashkar, so, instead of post another one.
    – Sobral
    May 23, 2013 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.