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 /...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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? |
|
|||
|
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 | |
|
|