httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: [users@httpd] Handling 404 errors
Date Wed, 26 Aug 2009 12:36:53 GMT
Richard Peacock wrote:

> *From:* Andrew Hole []
> *Sent:* 26 August 2009 12:24
> *To:*
> *Subject:* [users@httpd] Handling 404 errors

Richard, when replying, can you quote normally, and not make
your reply look like some malformed signature to the original
post?  I had no idea this was a reply until I hit "reply"
in my mailer.

> What I want to know is if there are any option on Apache to handle 404 
> status code without retry the request. When file not found, some logic 
> will handle the 404 and return the file located on other folder.

ErrorDocument.  That can be a script, or might even be handled
within httpd.conf with mod_rewrite.

> ErrorDocument 404 /errordocs/404error.php

Yes, that's an option.

> <html><META http-equiv=’refresh’ 
> content=’1;URL=$_SERVER["REQUEST_URI"]’></html>

But that is not.  It's very, very evil, and damages end-users.
Your PHP (if that is your choice of scripting language) needs
to return the document you want to send.

Nick Kew

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message