Re: [users@httpd] Custom 404 ErrorDocument Logs a 200

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "David P. Donahue" <ddonahue@xxxxxxxxxxx>
To: <users@xxxxxxxxxxxxxxxx>
Sent: Wednesday, July 27, 2005 10:44 AM
Subject: [users@httpd] Custom 404 ErrorDocument Logs a 200

Is there a way to make it log as a 404? I only ask because I have a reporting engine looking through my logs and it's registering far fewer 404s in the reports than it should. That and web crawlers aren't getting the hint that those pages aren't there :)

Any ideas?



I use this header in my 404 page:

<?php

header("HTTP/1.0 404 Not Found");

header("Expires: Mon, 26 Jul 2001 05:00:00 GMT");

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

header("Cache-Control: no-store, no-cache, must-revalidate");

header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma: no-cache");

?>

It seems to work.
If this is incorrect, please let me know.

Thank you,

Kevin



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux