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

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

 



<?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");

?>

You definitely sent me in the right direction for finding the answer. It looks like adding the following to my Page_Load function (this is using c# with Mono, I've actually never used php) does the trick:

Response.StatusCode = 404;
Response.StatusDescription = "Not Found";

Though the response header seems a bit... stripped down. I didn't want to mess with the header too much, since .NET has some background stuff going on. But I can research that further.

In any event, thanks for the help!


Regards,
David P. Donahue
ddonahue@xxxxxxxxxxx
http://www.cyber0ne.com

---------------------------------------------------------------------
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