Re: Custom 404 Error Page returning 200 status code - Apache/1.3.27 (Unix)

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

 



On 23/07/07, Lanny Marcus <mailing-lists@xxxxxxxxxxxxx> wrote:
Hello: The last line in the .htaccess file is
ErrorDocument 404 http://www.mydomainname.com/missing.html

The docs:
http://httpd.apache.org/docs/2.2/mod/core.html#errordocument

say:

=====
Note that when you specify an ErrorDocument that points to a remote
URL (ie. anything with a method such as http in front of it), Apache
will send a redirect to the client to tell it where to find the
document, even if the document ends up being on the same server. This
has several implications, the most important being that the client
will not receive the original error status code, but instead will
receive a redirect status code. This in turn can confuse web robots
and other clients which try to determine if a URL is valid using the
status code.
====

.. solution: don't do that.

Use a path to the error page in your url space, like:

ErrorDocument 404 /error_pages/404.html

If necessary you can use Alias to bring this directory in to your url space.

--
noodl

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