On Wed, 3 Aug 2005 08:55:51 +0200,
"Markus W." <markus.wallner.TakeThisOut@hotpop.com> posted:
> I would like to make a custom 404 (not found) error page.
>
> In the standard error page of Apache, Apache includes the name of the url
> that was not found.
>
> For example:
> the requested URL /xxx/abc.htm was not found on this server.
>
> In which variable is "/xxx/abc.htm" saved? Is there a way to read out this
> variable on my custom error page?
Look into the /error directory, and read the HTTP_NOT_FOUND.... file, you
can see how they've done it. Also read the manual about how you serve out
your custom 404 (as a file it can include these things; but if you just
redirect people to another URI, it can't).
The usual variables used in 404 pages are:
REQUEST_URI (what they asked for, but didn't get)
HTTP_REFERER (what tried to refer them - the page with the broken link)
You can find out about other variables by reading into SSI (server side
includes) and CGI (common gateway interface) Apache manual information.
If you're running from Linux, the error directory might be found at
/var/www/error/. Or if you're running on Windows, it might be a
sub-directory from where the Apache program is located.
--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.
This message was sent without a virus, please delete some files yourself.
>> Stay informed about: error 404