
Filtering the error.log (Apache 1.3)
You may change the source code in src/main/http_core.c at line 2738
********* from
if (r->finfo.st_mode == 0 || (r->path_info && *r->path_info)) {
char *emsg;
emsg = "File does not exist: ";
if (r->path_info == NULL) {
emsg = ap_pstrcat(r->pool, emsg, r->filename, NULL);
}
else {
emsg = ap_pstrcat(r->pool, emsg, r->filename,
r->path_info, NULL);
}
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r, emsg);
ap_table_setn(r->notes, "error-notes", emsg);
return HTTP_NOT_FOUND;
}
********* to
if (r->finfo.st_mode == 0 || (r->path_info && *r->path_info)) {
char *emsg;
emsg = "File does not exist: ";
if (r->path_info == NULL) {
emsg = ap_pstrcat(r->pool, emsg, r->filename, NULL);
}
else {
emsg = ap_pstrcat(r->pool, emsg, r->filename,
r->path_info, NULL);
}
if (r->filename eq "g:/apache/www/q.html") {
/* here you can write in another file or anything else
the condition must exactly and uses the true filename not
the URI
r->uri or r->unparsed_uri may be better
because it is independent from the phyiscal storage
*/
}
else {
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r,
emsg);
ap_table_setn(r->notes, "error-notes", emsg);
}
return HTTP_NOT_FOUND;
}
On Mon, 05 Oct 1998 03:56:17 GMT, dar...@factcomm.NOSPAM.co.jp (Darren
---------------------------
Andreas Grueninger
PRIVATE: gru...@stuttgart.netsurf.de
OFFICE: gruenin...@lfl.bwl.de
---------------------------