ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

404 response headers?

August 27, 2007 6:35pm

Subscribe [2]
  • #1 / Aug 27, 2007 6:35pm

    marlyred

    4 posts

    Hi,

    I have been checking to see if EE sends the correct 404 response headers when an incorrect or missing url is accessed.  Unfortunately it appears not.

    Are there plans to remedy this problem with a patch or a future release?

    Regards

  • #2 / Aug 27, 2007 6:38pm

    Lisa Wess

    20502 posts

    Hi, marylred - it absolutely can, see 404 and Throttling. You might also look at the require_entry parameter. =)

  • #3 / Aug 27, 2007 6:47pm

    marlyred

    4 posts

    Hi Lisa,

    Thanks for the quick reply.  Have these options been implemented here on ee.com?

  • #4 / Aug 27, 2007 6:52pm

    Lisa Wess

    20502 posts

    Yes, I just checked in the appropriate conditions for a 404 and they do appear to be implemented on this site. =)

  • #5 / Aug 27, 2007 7:16pm

    marlyred

    4 posts

    As an example:

    http://ellislab.com/forums/this-is-not-a-valid-url/

    does not return a 404 response header.

    I hope you don’t think I am being pedantic. I want to build a website with EE and I need to make sure everything works as it should before I go ahead and buy.

  • #6 / Aug 27, 2007 7:26pm

    Lisa Wess

    20502 posts

    I double checked this for you and that is not currently a feature in the forums; though it would make a good feature request for a future version. =)

  • #7 / Aug 27, 2007 7:59pm

    marlyred

    4 posts

    Thanks for the responses Lisa.  Unfortunately I cannot make a feature request as I am not a license holder….yet.

    I also noticed that the problem is also with the ee website as well as the forums..e.g.

    http://expressionengine.com/services/this-is-not-a-valid-url/ does not return a 404 not found, but 200 OK.

  • #8 / Aug 27, 2007 8:03pm

    Lisa Wess

    20502 posts

    Outside of the forums, the segment_2 location (where you have that test) is an extremely flexible location and therefore there is no built-in way to deliver a 404.  It can be used for the template, for the url-title, for a variety of different IDs, or for anything you want by using parameters.  There is absolutely no way for EE to know if it is a valid URI or not.

    But, you can specifically tell your templates what header to deliver, see this thread for several such examples =)

  • #9 / Aug 27, 2007 8:11pm

    Derek Jones

    7561 posts

    No built in way, except of course Lisa’s aforementioned require_entry= parameter for the weblog entries tag.  We’ve never found this to be a major priority for our own site, so we use only the basic 404 behavior.  One certainly could make all such URLs as that return 404 pages if they desired.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases