Possible to return 404 error code with custom error document?

This is a discussion on Possible to return 404 error code with custom error document? within the Linux Web Servers forums, part of the Web Server and Related Forums category; I've been using ErrorDocument on some sites to return a custom error document, as in this example: ErrorDocument 404 /...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-04-2005
Jorey Bump
 
Posts: n/a
Default Possible to return 404 error code with custom error document?

I've been using ErrorDocument on some sites to return a custom error
document, as in this example:

ErrorDocument 404 /notfound.html

Using this directive, requests for nonexistent resources result in apache
returning a 302 Found status code with a Location: header pointing to the
custom page, which the browser then fetches.

This works fine, but I've now lost the ability to parse logs for 404
errors. Is it possible to return a 404 error *and* a custom HTML response
that will be displayed by browsers?

  #2 (permalink)  
Old 09-05-2005
Andreas Prilop
 
Posts: n/a
Default Re: Possible to return 404 error code with custom error document?

On Sun, 4 Sep 2005, Jorey Bump wrote:

> I've been using ErrorDocument on some sites


Give URLs!

> to return a custom error document, as in this example:
>
> ErrorDocument 404 /notfound.html
>
> Using this directive, requests for nonexistent resources result in apache
> returning a 302 Found status code with a Location: header pointing to the
> custom page, which the browser then fetches.
> This works fine,


This does not "work fine" but it is wrong because 302 is not the same
as 404.

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:02 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0